Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Checked List box - datavaluefield

Reply
Thread Tools

Checked List box - datavaluefield

 
 
Richard Roche
Guest
Posts: n/a
 
      12-02-2003
How can i set the checked/not checked value of a
checklistbox from a dataset/datareader?

I tried assigning the 'datavaluefield' but the checked
values are never set. I'm using a bit field in sql server.

thanks.



 
Reply With Quote
 
 
 
 
MSFT
Guest
Posts: n/a
 
      12-03-2003
Hi Richard,

Checklistbox doesn't support bindind to its checkbox value. I think you may
use a repeater control instead. For exmaple:

<asp:Repeater id="Repeater1" runat="server" DataSource="<%# DataSet21 %>"
DataMember="Table6">

<itemtemplate>
<asp:CheckBox Runat =server Checked =<%#
DataBinder.Eval(Container.DataItem, "check") %> ></asp:CheckBox>

<%# DataBinder.Eval(Container.DataItem, "name") %><br>
</itemtemplate>


</asp:Repeater>


Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


 
Reply With Quote
 
 
 
 
Richard Roche
Guest
Posts: n/a
 
      12-03-2003
Thank you, i appreciate it.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckBox Checked=false when checked in DataList yurps ASP .Net 1 02-29-2008 01:08 PM
Dropdownlist,DataTextField,DataValueField ? Sam ASP .Net 1 02-18-2005 11:52 AM
Advantage of DataValueField =?Utf-8?B?U3VuaWwgU2FiaXI=?= ASP .Net 3 02-01-2005 02:56 PM
Concatenating Multiple Values for DataValueField =?Utf-8?B?UkY=?= ASP .Net 6 12-03-2004 05:15 PM
DropdownList, DataValueField, DataTextField and Custom Collections.. Parodi Development ASP .Net 0 09-10-2004 06:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57