HighTechTalks DotNet Forums  

Tree View Event Problem

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Tree View Event Problem in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Santosh
 
Posts: n/a

Default Tree View Event Problem - 06-16-2006 , 06:20 AM






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.


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Tree View Event Problem - 06-19-2006 , 12:38 AM






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]


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.