In a webform how do I populate a treeview from a dataset?
All the examples seem to use xml.
Thanks in AdvanceJust loop through the dataset and add items to the treeview programmatically.
There is no simple way like Treeview1.Data= YourDataSet, so you just have to do something like:
'I dont know the specific code for adding to a treeview, but it would be somthing like this
Dim tItem as TreeViewItem
For x = 0 to ds1.Rows.Count-1
tItem = New TreeViewItem
tItem.text = ds1.Rows(x).Item(0).ToSTring()
TreeView1.Items.Add(tItem)
Next
Subscribe to:
Post Comments (Atom)
1 comments:
TreeView data binding to datatable
Post a Comment