Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested CheckBoxList controls ?

Status
Not open for further replies.

baden

Programmer
Feb 6, 2002
125
US

Scenario:

[] Category
[] Subcat
[] Subcat
[] Subcat
[] Category 2
[] Subcat
[] Subcat
...

The checkboxes @ the category level are to select all from a given category.

Originally, I created a nested repeater, using two queries, linking the tables through Relations() and using simple checkboxes.

What I think would be optimal would be to use a CheckBoxList Control for the subcategories, but I've been unsuccessful in doing this so far.

I want to retrieve db values to relate to given checkboxes - checked=t/f.

Can someone point me to a good ref or give me a great ASP.Net C# example please?


Thanks.
 
I couldn't find any way to nest checkboxlists. You can add a listitem on the top of each group "Check All" And when the page posts back you can check if that option is checked and select all in the group. Also you can use JavaScrip if you don't want a post back done.

Jim
 
You could probably nest the checkboxes by using nested repeaters


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Man, it would be nice to be able to nest checkbox lists. I did manage to do it, but not w/ the checkbox list. I'll write an FAQ.
 
I guess another option would be to use a TreeView control and turn the checkboxes on for each node. This way the functionality is already created for you.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top