473,671 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "IsInCatego ry". 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 2310
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*****@maratr ane.com>
Newsgroups: microsoft.publi c.dotnet.framew ork.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.co m>
NNTP-Posting-Host: 68.88.67.166
X-Complaints-To: ab***@prodigy.n et
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[BFNTCNVPDTNTKHW XKB@X^B_OCJLPZ@ ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_ KVIOR\T_M_AW_
M[_BWU_HFA_]@A_A^SGFAUDE_DF TMQPFWVW[QPJNDate: Sat, 24 Apr 2004 15:41:35 GMT
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA05.phx.gbl!TK 2MSFTNGP08.phx. gbl!newsfeed00. s
ul.t-online.de!t-online.de!news. glorb.com!prodi gy.com!prodigy. com!newsmst01a
.news.prodigy.c om!prodigy.com! postmaster.news .prodigy.com!ne wssvr15.news.pr o
digy.com.POSTED !688def4b!not-for-mailXref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2287 34
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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 "IsInCatego ry". 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
3127
by: Sebi | last post by:
Hello all is it possible to add a checkbox in a DataGrid for Boolean Data? Thanks in advance
0
1920
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 is exposed. Is there a way to bind the ddl inside of an already databound templated column? Thanks , of course Michael
1
3337
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, asp:labels. Within the <form>, but outside the fieldset, containing the datatlist, I have a usercontrol (used to collect search criteria) and some asp:button controls (used to initiate actions - ie. retrieve db data, reset user control fields,...
10
2428
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 control in a datagrid? Now I have a Select column but the problem is that the user needs to select more than one record and send them all to print, instead of being one by one like is now with the Select column. Another question, is it possible to...
1
3775
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 say's "process". I want to LOOP through each datalist entry and see if the user checked the check box. Simple. I wrote the code, but the checked value is ALWAYS False. Any ideas? Here's the code...
2
1531
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 way to do this? Thanks.
4
2206
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 (i.e. index=0) which has the name "title" in place of it ? For example:
1
2163
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 Labels existing in the DataList should be visible but if the CheckBox is unchecked by the user, the Labels inside the DataList should be made invisible. How do I do this? Note that the AutoPostBack property of the CheckBox has been set to
2
1621
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 from one table and 2) each box is checked or unchecked according to a different table. I have figured out a way to load the checkboxes by using a DataList. I
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.