TreeView Population

Discussion in 'ASP .Net Web Controls' started by Steven Herring via .NET 247, Aug 4, 2004.

  1. 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 ?


    --------------------------------
    From: Steven Herring

    --------------------------------
    From: Steven Herring

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>YvqvEvSv7USGEFpXxJvGeg==</Id>
     
    Steven Herring via .NET 247, Aug 4, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Nichols

    Dynamic IFrame Population

    Scott Nichols, Dec 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,654
    Hermit Dave
    Dec 16, 2003
  2. Fred
    Replies:
    1
    Views:
    359
    John Saunders
    Jul 11, 2004
  3. Steven Cheng[MSFT]

    RE: Simple datagrid population problem

    Steven Cheng[MSFT], Oct 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    346
    Steven Cheng[MSFT]
    Oct 8, 2004
  4. Craig G

    Datagrid Population

    Craig G, Dec 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    486
    Eliyahu Goldin
    Dec 8, 2004
  5. Replies:
    2
    Views:
    790
Loading...

Share This Page