All Products
Demos
Services
Blogs
Docs & Support
Pricing
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
TreeView
/
Retrieve ParentID Node of Selected Node
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
5 posts, 0 answers
Luca Fumagalli
7 posts
Member since:
Aug 2009
Posted 25 Aug 2009
Link to this post
Dear Sirs,
i have a problem: i need to retrieve ParentID Node of Selected Node, how can i do that?
If possible in VB language
Many thanks
Luca
Shinu
17764 posts
Member since:
Mar 2007
Posted 25 Aug 2009
Link to this post
Hi Luca,
I hope you are trying to access the ID of the Parent node of a clicked node. If so give a try with the following approach and see whether it helps.
VB:
Protected
Sub
RadTreeView1_NodeClick(
ByVal
sender
As
Object
,
ByVal
e
As
RadTreeNodeEventArgs)
If
e.Node.ParentNode IsNot
Nothing
Then
Dim
parentNodeID
As
String
= e.Node.ParentNode.ID.ToString()
End
If
End
Sub
Shinu
Luca Fumagalli
7 posts
Member since:
Aug 2009
Posted 25 Aug 2009
Link to this post
Many thanks for your answer.
Another question: if I want to retrieve the ID of the selected node, which instruction I have to use?
Thanks
Luca
Princy
17421 posts
Member since:
Mar 2007
Posted 25 Aug 2009
Link to this post
Hello Luca,
You just have to use the following code:
Vb:
Protected
Sub
RadTreeView1_NodeClick(
ByVal
sender
As
Object
,
ByVal
e
As
RadTreeNodeEventArgs)
Dim
nodeID
As
String
= e.Node.ID.ToString()
End
Sub
Thanks
Princy.
Luca Fumagalli
7 posts
Member since:
Aug 2009
Posted 25 Aug 2009
Link to this post
opsss :)
thanks
Back to Top
Close