473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2299
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.