Click here to Skip to main content
16,021,181 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello,

I am developing a project in c# in which i want the output some thing like this.

Category1
Subcategory1
Sub_Subcategory1 Sub_Subcategory2

Subcategory2
Sub_Subcategory1 Sub_Subcategory2


Category2
Category3


All this has to be populated from database by using dynamic checkboxlist,
when i select Sub_Subcategories it has to be entered into the database.
if i check Category1,Subcategory1 and Subcategory2 has to displayed, if I check Subcategory1, Sub_Subcategory1 and Sub_Subcategory2 has to be displayed.
Please send me the code.
Please help me.
its very urgent..
Posted
Updated 14-Jun-12 20:45pm
v2
Comments
Sergey Alexandrovich Kryukov 11-Jun-12 0:28am    
First of all, you need to tag application type or UI library to use: WPF? Forms? Silverlight? ASP.NET?
--SA

Please see my comment to the question. As soon as you did not specify what kind of application your application should be, it's not possible to give you a definitive answer.

But the general idea is this: as soon as you speak of nested lists, this should be more general structure, a "checkbox tree". You can always have or create a control implementing a view of such structure. For example, if you use System.Windows.Forms, you can use the class System.Windows.Forms.TreeView which can have check boxes next to the tree nodes:
http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.checkboxes.aspx[^].

—SA
 
Share this answer
 
v2
Comments
VJ Reddy 11-Jun-12 1:19am    
Good answer. 5!
Sergey Alexandrovich Kryukov 11-Jun-12 10:40am    
Thank you, VJ.
--SA
thanks for baring me. I solved by myself.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900