TreeView Population

  • Thread starter Steven Herring via .NET 247
  • Start date
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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top