We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeViewADV Get Selected Node Value

Thread ID:





114641 Nov 28,2013 04:55 PM UTC Dec 4,2013 05:01 AM UTC Silverlight 1
Tags: Tools
Darren Hunnter
Asked On November 28, 2013 04:55 PM UTC


I am building a treevewadv in code behind using the following code

Private Sub DisplayFF(LoadOp As ServiceModel.DomainServices.Client.LoadOperation(Of FileAndFolderList))
        Dim iitem As TreeViewItemAdv
        Dim gid As Long = 0
        ListOffileandFolder = New List(Of FileAndFolderList)
        ListOffileandFolder = LoadOp.Entities.ToList
        Dim rooitemsonly = From c In ListOffileandFolder
                           Where c.RootItem = True
        For Each item In rooitemsonly
            iitem = New TreeViewItemAdv
            iitem.Name = item.ID
            iitem.Header = item.Name
            If item.Folder = True Then
                iitem.ExpandImageSource = GetImage("/LucidDocManager;component/Images/Folder-Open_vsmall.png")
                iitem.LeftImageSource = GetImage("/LucidDocManager;component/Images/Folder_vsmall.png")
            ElseIf item.Folder = False Then
                iitem.LeftImageSource = GetImage("/LucidDocManager;component/Images/Item-New_small.png")
            End If
            AddHandler iitem.GotFocus, AddressOf gtest
        For Each item As TreeViewItemAdv In tv_foldernadfiles.Items
            gid = Val(item.Name)
            Dim checker = From c In ListOffileandFolder
                          Where c.parentID = gid
            For Each citem In checker
                iitem = New TreeViewItemAdv
                iitem.Name = citem.ID
                iitem.Header = citem.Name
    End Sub
The problem I have is I would like to be able to select a node and get it value.
With a regular Winforms Treeview Control this is simple but with the Silverlight control there seams to be no way of simpley clicking on a node and getting it value. 

Muthukumar A [Syncfusion]
Replied On December 4, 2013 05:01 AM UTC

Hi Darren,

Sorry for the delay being caused.

We have created a sample based on your requirement stated in the DirectTrac.Please download the same from below location.

In this sample in selectednodechanged, We can get the Selected node details and also selected node's parent node details.

Please let us know if the sample fulfill your needs.If our understanding is differ from your requirement could you please provide as some more details about your requirement.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon