How to Select all items in CheckedListBox with an itam in a CheckedListBox ...
-
Hi... How i can select all items in a CheckedListBox on selction of a first CheckedListBox item...? Items in CheckedListBox are as follows- 'Selct All' First Item Second Item Third Item So on click of 1st CheckedListBox item(SelectAll), i want to select all items...How i can do this...? Thanks in adavnce, Vinay
-
Hi... How i can select all items in a CheckedListBox on selction of a first CheckedListBox item...? Items in CheckedListBox are as follows- 'Selct All' First Item Second Item Third Item So on click of 1st CheckedListBox item(SelectAll), i want to select all items...How i can do this...? Thanks in adavnce, Vinay
This is bad UI. You can make it work, but select all should be a button, not one of the items in the list.
Christian Graus - C++ MVP
-
This is bad UI. You can make it work, but select all should be a button, not one of the items in the list.
Christian Graus - C++ MVP
Christian Graus wrote:
This is bad UI.
Not sure I agree with that. If you have a huge field of checkboxes, say to determine which fields to search on, one of the options could be All, which would select all of the checkboxes for you. I've seen this done out in the wild, and it seems to make sense. Not saying there's not a better way, just saying I don't think it's a bad UI. [edit]Ahh, it's a list box. Should have read that a little closer. I agree with Christian, use a button.[/edit]
- S 50 cups of coffee and you know it's on!
-
Christian Graus wrote:
This is bad UI.
Not sure I agree with that. If you have a huge field of checkboxes, say to determine which fields to search on, one of the options could be All, which would select all of the checkboxes for you. I've seen this done out in the wild, and it seems to make sense. Not saying there's not a better way, just saying I don't think it's a bad UI. [edit]Ahh, it's a list box. Should have read that a little closer. I agree with Christian, use a button.[/edit]
- S 50 cups of coffee and you know it's on!
-
Christian Graus wrote:
This is bad UI.
Not sure I agree with that. If you have a huge field of checkboxes, say to determine which fields to search on, one of the options could be All, which would select all of the checkboxes for you. I've seen this done out in the wild, and it seems to make sense. Not saying there's not a better way, just saying I don't think it's a bad UI. [edit]Ahh, it's a list box. Should have read that a little closer. I agree with Christian, use a button.[/edit]
- S 50 cups of coffee and you know it's on!
It doesn't matter what it is, having a check box that says 'select all' makes no sense, it should be a seperate control to the type of control that is being selected ( and probably a button )
Christian Graus - C++ MVP
-
I have to make this type of application.... since that is the requirement...so can u tell me ... How i can do this...? Regards, Vinay
You absolutely must have a list of checkbox items, and the first item must say 'select all' ? A button is a better choice . But, if you must make a god awful UI, just handle the event for an item to be checked, check if it's the 'check all' item, and if it is, check them all.
Christian Graus - C++ MVP
-
It doesn't matter what it is, having a check box that says 'select all' makes no sense, it should be a seperate control to the type of control that is being selected ( and probably a button )
Christian Graus - C++ MVP
All [ ] Author [ ] Text [ ] Date [ ] Etc. Granted you could write the same thing with radio buttons or something, like: ( ) All ( ) Selected [ ] Author [ ] Text [ ] Date [ ] Etc. But I'd say the first one makes equally as much sense to most users, especially when it selects all the other check boxes. It's just a shortcut, in either case.
- S 50 cups of coffee and you know it's on!
-
You absolutely must have a list of checkbox items, and the first item must say 'select all' ? A button is a better choice . But, if you must make a god awful UI, just handle the event for an item to be checked, check if it's the 'check all' item, and if it is, check them all.
Christian Graus - C++ MVP
-
Ok...Can u tell me if i give a single CheckBox(say 'Selct All') outside this CheckBoxList then How i can select all ites in CheckBoxList on selction that CheckBox(Selct All). Thanks for all your replies, Vinay
If there's no CheckAll method on the checkboxlist, use foreach on the items collection to check them all.
Christian Graus - C++ MVP
-
If there's no CheckAll method on the checkboxlist, use foreach on the items collection to check them all.
Christian Graus - C++ MVP
-
Hi.. Actually i dont know number of items are there in that CheckBoxList so can you tell me how i can use foreach loop for my CheckBoxList. How i'll get collection of items in that CheckBoxList. Regards, Vinay
Do you not know how for each works ? foreach(CheckBoxListITem item in myBox.Items) { item.Checked = true; } I am sure that's not the type of the items, but that's how it looks.
Christian Graus - C++ MVP
-
Hi.. Actually i dont know number of items are there in that CheckBoxList so can you tell me how i can use foreach loop for my CheckBoxList. How i'll get collection of items in that CheckBoxList. Regards, Vinay