treeview

Discussion in 'ASP .Net Building Controls' started by ally, Jan 8, 2004.

  1. ally

    ally Guest

    I have a treeview in my ASP.NET c# application.when someone selects a node
    on the treeview How do I set the node name
    myNodeName = TreeView1.Nodes(TreeView1.SelectedNodeIndex).Text
    The above code only gave me the value of the parent Node
    Any and all help would be greatly appreciated!!!!
     
    ally, Jan 8, 2004
    #1
    1. Advertising

  2. Hi,


    Microsoft.Web.UI.WebControls.TreeNode tn=new
    Microsoft.Web.UI.WebControls.TreeNode();

    tn=Treeview1.GetNodeFromIndex(Treeview1.SelectedNodeIndex);

    myNodeName=tn.Text

    Hope this helps.

    Regards

    Marshal Antony



    http://dotnetmarshal.com



    "ally" <> wrote in message
    news:...
    > I have a treeview in my ASP.NET c# application.when someone selects a

    node
    > on the treeview How do I set the node name
    > myNodeName = TreeView1.Nodes(TreeView1.SelectedNodeIndex).Text
    > The above code only gave me the value of the parent Node
    > Any and all help would be greatly appreciated!!!!
    >
    >
     
    Marshal Antony, Jan 16, 2004
    #2
    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. =?Utf-8?B?VHltYm93?=
    Replies:
    2
    Views:
    24,498
    =?Utf-8?B?VHltYm93?=
    Jan 10, 2006
  2. abargaddon
    Replies:
    0
    Views:
    1,078
    abargaddon
    Jan 17, 2008
  3. Per Salmi

    TreeView not rendering nodes? Cacheing of a TreeView

    Per Salmi, Oct 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    486
    Steve Drake
    Oct 15, 2003
  4. Ionutz
    Replies:
    2
    Views:
    540
    Ionutz
    Oct 23, 2005
  5. stepkurt

    Microsoft Treeview vs System Treeview

    stepkurt, Aug 29, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    393
    Teemu Keiski
    Sep 2, 2007
Loading...

Share This Page