Tree View Event Problem

Discussion in 'ASP .Net Datagrid Control' started by Santosh, Jun 16, 2006.

  1. Santosh

    Santosh Guest

    Dear all,

    I am using tree view control when i am click on nodes i want to find
    whether my selected node is parent or child. so please help me how i
    can do it please help me.

    Regards

    Santosh Shinde.
     
    Santosh, Jun 16, 2006
    #1
    1. Advertising

  2. Santosh

    Guest

    Hi Santhosh,

    You can use the SelectedNodeChanged event to know whether the selected
    node is parent or child.

    [C# code snippet]

    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs
    e)
    {
    TreeNode parNode = TreeView1.SelectedNode.Parent;
    if (parNode != null)
    Response.Write("child");
    else
    Response.Write("parent");
    }

    -Bhuva
    [www.syncfusion.com
    http://www.syncfusion.com/faq/aspnet/default.aspx]
     
    , Jun 19, 2006
    #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?TWFkZHk=?=

    Problem showing tree view

    =?Utf-8?B?TWFkZHk=?=, Feb 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    308
    =?Utf-8?B?TWFkZHk=?=
    Feb 7, 2005
  2. news.microsoft.com

    problem in tree view

    news.microsoft.com, Jan 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    355
    Patrick.O.Ige
    Jan 17, 2006
  3. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,125
  4. raki
    Replies:
    1
    Views:
    1,146
    Alexey Smirnov
    Jun 24, 2009
  5. Parthiv Joshi
    Replies:
    1
    Views:
    688
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page