Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C# (http://www.programmingforums.org/forum16.html)
-   -   CheckBoxList (http://www.programmingforums.org/showthread.php?t=15626)

hbe02 Apr 15th, 2008 1:01 PM

CheckBoxList
 
whats the attribute of the CheckBoxList so i can have only 1 selected at a time. or should i do that in code?

Arla Apr 15th, 2008 1:30 PM

Re: CheckBoxList
 
Isn't that a radiobutton list?

hbe02 Apr 15th, 2008 1:37 PM

Re: CheckBoxList
 
no its checkbox list. im using visual developer

hbe02 Apr 15th, 2008 1:37 PM

Re: CheckBoxList
 
still they should have the same attribute name

Jimbo Apr 15th, 2008 9:12 PM

Re: CheckBoxList
 
Why not use a RadioButtonList though? The definition of that is single-select, whereas CheckboxList provides a multi-select functionality. Unless you want something that clears the rest, like this:
:

select all that apply:
[] a
[] b
[] c
[] none of the above

In which case, when the last one is selected, I'd just set the others to not selected.

xavier Apr 15th, 2008 11:24 PM

Re: CheckBoxList
 
Quote:

Originally Posted by hbe02 (Post 143934)
whats the attribute of the CheckBoxList so i can have only 1 selected at a time. or should i do that in code?

You have to do that in code. On the CheckedChanged event , you clear all the currently checked items, and check the right one.


All times are GMT -5. The time now is 10:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC