- How to generate a tree view in asp.net?
- In my asp.net project i need a tree view like structure, the format given below
alt text http://dev1.ispg.in/dg/untitled.bmp
How to generate a tree view in asp.net? In my asp.net project i need
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ASP.NET does have a
TreeViewcontrol that you can use to display a Treeview very similar to the one you show.If you require the
Checkboxeson each and every Treeview node, but sure to set theShowCheckBoxesattribute to the appropriate setting (i.e.ShowCheckBoxes="All">Regarding the nodes themselves, you can bind the
TreeViewto aDataSourcewhich can either be an ASP.NETSiteMapfile or an XML Document. Alternatively, you can programmatically add the nodes yourself in code like so:Some other useful links are:
Using the TreeView Control and a DataList to Create an Online Image Gallery
ASP.NET Treeview Quickstart Tutorial