I'm a little stuck trying to figure out the best way to do this.
Scenario: Using the TreeView to allow a user to create, edit, and sort menu items. It's going to allow an end user to build the menu of their web site.
The data table is simple, an ID, Parent ID, Display Text, and a Sort column (Int).
I am connecting the data table to a LinqDataSource which is then attached to the TreeView. I have the data source ordering by the sort column.
I have everything set up to allow drag and drop and I'm using the NodeDrop event to handle the dragging and dropping of nodes. However, I'm running into a problem trying to get to the data in the Node. I need to access the Sort column of that row so I can resort the list. DataItem is null, which the documentation says it will be and to use custom properties or the value property. I don't use Value for anything, but even if I saved the ID to that, I would still need the sort property. Plus, since the data source orders by the sort column, I wouldn't be able to just put the sort column in as a custom property as that won't properly sort the list.
Is there a way to get and change the underlying data that is attached to that node?
Scenario: Using the TreeView to allow a user to create, edit, and sort menu items. It's going to allow an end user to build the menu of their web site.
The data table is simple, an ID, Parent ID, Display Text, and a Sort column (Int).
I am connecting the data table to a LinqDataSource which is then attached to the TreeView. I have the data source ordering by the sort column.
I have everything set up to allow drag and drop and I'm using the NodeDrop event to handle the dragging and dropping of nodes. However, I'm running into a problem trying to get to the data in the Node. I need to access the Sort column of that row so I can resort the list. DataItem is null, which the documentation says it will be and to use custom properties or the value property. I don't use Value for anything, but even if I saved the ID to that, I would still need the sort property. Plus, since the data source orders by the sort column, I wouldn't be able to just put the sort column in as a custom property as that won't properly sort the list.
Is there a way to get and change the underlying data that is attached to that node?