S
Steven Herring via .NET 247
I am in the process of populating a treeview control dynamically using information from Scitegics Pipeline Pilot program. The node population needs to be 'on demand'.
I have the treeview building OK but only to one level down.
The following code fails as soon as the value of e.Node is not able to be converted (for example "5" is OK but "5.1" is not !)
private void TreeView1_Expand( object sender , Microsoft.Web.UI.WebControls.TreeViewClickEventArgs e)
{
...
nodeFolder = ((Microsoft.Web.UI.WebControls.TreeView)sender).Nodes[(int.Parse(e.Node))];
...
}
Can anyone tell me how to get the expanding node details in a nice way and one which works for n levels deep ?
I have the treeview building OK but only to one level down.
The following code fails as soon as the value of e.Node is not able to be converted (for example "5" is OK but "5.1" is not !)
private void TreeView1_Expand( object sender , Microsoft.Web.UI.WebControls.TreeViewClickEventArgs e)
{
...
nodeFolder = ((Microsoft.Web.UI.WebControls.TreeView)sender).Nodes[(int.Parse(e.Node))];
...
}
Can anyone tell me how to get the expanding node details in a nice way and one which works for n levels deep ?