How to associate an ASP.NET TreeView control with data?

I have this table structure:
- CategoryID
- CategoryName
- ParentID

I want to load data from this table into a treeview control in order to be able to edit / delete these records. How to do it?

+4
source share
1 answer

For more details, see How do you bind to a TreeView control? (question relates to WinForms, but still applies to ASP.NET)

The long and short is that you cannot bind data to a TreeView. TreeViews are hierarchical data structures and, as such, do not have a built-in binding mechanism. You will need to flip your own binding to do this.

+2
source

All Articles