4

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

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

Amr Elgarhy
  • 66,568
  • 69
  • 184
  • 301

1 Answers1

2

For more details see: How do you databind to a TreeView control? (the question is WinForms, but still applies to ASP.NET)

The long and short is that you can't databind to a TreeView. TreeViews are hierarchical data structures and as such do not have a native binding mechanism. You'll have to roll your own binding to do this.

Community
  • 1
  • 1
Gavin Miller
  • 43,168
  • 21
  • 122
  • 188