23 February 2009
Binding Hierarchical DataSets to TreeView Controls
OOB the ASP.NET TreeView control doesn’t support binding to Hierarchical DataSets. Ralph Varjabedian created a HierarchicalDataSet class to help with this. Read more about it here.
Here’s a snippet…it’s simple to implement:
TreeView1.DataSource = new HierarchicalDataSet(dataSet, "ID", "ParentID");
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
Comments
Leave a Comment
Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.