472,779 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

CheckBox Bound to DataReader column inside DataList

Okay - I'm going crazy here trying to figure out how to do this - here goes:

I have a DataList populated by a DataReader. In the DataReader, a column is
present called "IsInCategory". I want to have a checkbox bound to that
column (bit in SQL Server).

I have tried everything and can't see a way to do this without createing an
event handler for DataBind() of the CheckBox control. Surely there has to be
a better way (and please don't tell me the better way is to use a DataGrid
lol).

Anyone have advice?

Thanks!
Nov 18 '05 #1
1 2252
I think template can solve your problem.

Read "Creating Templates in the Web Forms Designer" in the Visual Studio
.Net 2003 Help document.

--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).
--------------------
From: "Bigtoga" <bi*****@maratrane.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: CheckBox Bound to DataReader column inside DataList
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.132
Message-ID: <PU****************@newssvr15.news.prodigy.com>
NNTP-Posting-Host: 68.88.67.166
X-Complaints-To: ab***@prodigy.net
X-Trace: newssvr15.news.prodigy.com 1082821295 ST000 68.88.67.166 (Sat, 24 Apr 2004 11:41:35 EDT)NNTP-Posting-Date: Sat, 24 Apr 2004 11:41:35 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: [[PGWWKEZBS[S]HXGZJT_V@AUSXB@DTMNHWB_EYLJZ]BGIELNVUEAE[YETZPIWWI[FCIZA^NBFXZ
_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_
M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJNDate: Sat, 24 Apr 2004 15:41:35 GMT
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!prodigy.com!prodigy.com!n ewsmst01a
.news.prodigy.com!prodigy.com!postmaster.news.prod igy.com!newssvr15.news.pro
digy.com.POSTED!688def4b!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:228734
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Okay - I'm going crazy here trying to figure out how to do this - here goes:
I have a DataList populated by a DataReader. In the DataReader, a column is
present called "IsInCategory". I want to have a checkbox bound to that
column (bit in SQL Server).

I have tried everything and can't see a way to do this without createing an
event handler for DataBind() of the CheckBox control. Surely there has to bea better way (and please don't tell me the better way is to use a DataGrid
lol).

Anyone have advice?

Thanks!


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sebi | last post by:
Hello all is it possible to add a checkbox in a DataGrid for Boolean Data? Thanks in advance
0
by: VbScripter | last post by:
In the code below, I have an editItemTemplate that will have to have a long list of ip's bound to it. The problem is that the lisbox is not seen by asp.net until after the datalist containing it...
1
by: Glenn Owens | last post by:
Here's the scenario: I have a DataList populated from a datatable sitting inside a fieldset. Each element (row) in the Datalist has the following child controls: asp:checkbox, asp:image,...
10
by: Jennyfer J Barco | last post by:
Hello, I have a datagrid that brings some information from a query. I need to have a checkbox in each row so the user can select the rows he wants to reprint. Is it possible to have a checkbox...
1
by: VB Programmer | last post by:
Simple: I have a datalist that is holding a bunch of job opportunities. Beside each opp (in the item template) there's a checkbox that says "apply". After the datalist there's a button that...
2
by: Derek | last post by:
I have a datalist that contains one unbound column with a checkbox. When the user clicks a button, I need to count all the checked boxes in the datalist. Can anyone give me an idea as to the best...
4
by: bienwell | last post by:
Hi all, Data displayed on the datalist control is bound by the column name of the dataset like this : <%# DataBinder.Eval(Container.DataItem, "title")%> Could I use an element of the array...
1
by: rn5a | last post by:
A ASPX page has a DataList control with a few Labels. This page also has a CheckBox which resides OUTSIDE the DataList. By default, this CheckBox is checked. If the CheckBox is checked, then the...
2
by: mschmidt18 | last post by:
Hello, I am fairly familiar with Web Development with .Net, but i have come across a problem that is giving me some trouble...... I want to have a list of checkboxes where 1) the labels come...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.