Retrieve ParentID Node of Selected Node

5 posts, 0 answers
  1. Luca Fumagalli
    Luca Fumagalli avatar
    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
  2. Shinu
    Shinu avatar
    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 ObjectByVal e As RadTreeNodeEventArgs) 
            If e.Node.ParentNode IsNot Nothing Then 
                Dim parentNodeID As String = e.Node.ParentNode.ID.ToString() 
            End If 
        End Sub 
     
     


    Shinu
  3. Luca Fumagalli
    Luca Fumagalli avatar
    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
  4. Princy
    Princy avatar
    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 ObjectByVal e As RadTreeNodeEventArgs)  
             
         Dim nodeID As String = e.Node.ID.ToString()  
             
     End Sub  

    Thanks
    Princy.
  5. Luca Fumagalli
    Luca Fumagalli avatar
    7 posts
    Member since:
    Aug 2009

    Posted 25 Aug 2009 Link to this post

    opsss :)
    thanks
Back to Top