I am in the process of writing an application which exposes information from Scitegic's Pipeline Pilot product using web services.
I am able to expose the contents of the first level folder in the treeview but am struggling to see a nice way to do this for subsequent levels in the hierarchy.
The line which is causing me problems is the following:
private void TreeView1_Expand( object sender , Microsoft.Web.UI.WebControls.TreeViewClickEventArgs e)
{
....
<b>nodeFolder = ((Microsoft.Web.UI.WebControls.TreeView)sender).Nodes[(int.Parse(e.Node))];</b>
....
If the user is at level 0 things are OK ("5") but as soon as a level further down is reached the following value of e.Node is seen - "5.0" - which causes an error because of the int.Parse statement.
Does anyone have a nice way to dela with this in c# ?
Any help much appreciated,
Oscript
I am able to expose the contents of the first level folder in the treeview but am struggling to see a nice way to do this for subsequent levels in the hierarchy.
The line which is causing me problems is the following:
private void TreeView1_Expand( object sender , Microsoft.Web.UI.WebControls.TreeViewClickEventArgs e)
{
....
<b>nodeFolder = ((Microsoft.Web.UI.WebControls.TreeView)sender).Nodes[(int.Parse(e.Node))];</b>
....
If the user is at level 0 things are OK ("5") but as soon as a level further down is reached the following value of e.Node is seen - "5.0" - which causes an error because of the int.Parse statement.
Does anyone have a nice way to dela with this in c# ?
Any help much appreciated,
Oscript