I am fairly new to web programming so apologies if I don’t make sense. I am creating a dataset and populating the treeview via ConvertTabularDataToHierarchical(). I would like to then use the original ID I passed in to this function to be accessable back at the server so I can export the node text and ID back to the database again.
I have found a very longwinded way through the asp.net page to get the ID from the ConvertTabularDataToHierarchical() import and add it to ‘.value’ then export out that way but I’m guessing theres an easier method. Any help would be greatly appriciated!
Heres the long winded way in VB...
For Each node In flyTreeView2.Nodes
'dim originalTabularDataItem = ((IHierarchyData)e.Node.DataItem).Item
Dim originalTabularDataItem As IHierarchyData = node.DataItem
Dim dataRowView As DataRowView = originalTabularDataItem.Item
node.Value = DirectCast(DirectCast(DirectCast(originalTabularDataItem.Item, System.Object), System.Data.DataRowView).Row, System.Data.DataRow).ItemArray(0)
If node.ChildNodes.Count > 0 Then
UpdateChildNodeValue(sb, node, nodeCount)
End If
Next