How to get the full path of a selected node of Treelist DevExpress?

0

I have a treeList (DevExpress) and I want to get the complete path of a selected node in a label. For example: Parent_Node \ Nodo_Hijo \ Nodo_Nieto ... , something like the treeview fullpath of native Windows forms.

Path : Dxperience 12.2 Demos \ WinForms \ XtraTreeList

It would be the route on the selected node.

How to get the full path of the selected node?

    
asked by Raúl 01.09.2017 в 02:15
source

1 answer

0

You can navigate from the selected child node to your parent node using the ParentNode property. You must bear in mind that when you reach the top level node (the one that does not have a parent) the property ParentNode will return value Null . Therefore, with a simple loop, consulting the parents until they reach null, you can obtain what you are looking for.

Greetings

    
answered by 01.09.2017 в 11:37