gijgo icon indicating copy to clipboard operation
gijgo copied to clipboard

Get All parents for selected node in Treeview

Open TechAspirant opened this issue 6 years ago • 2 comments

Hello,

Below is the tree view I have created with gijgo version 1.9.11, I want list of all parents that are are linked to selected child node image

When I Select Dist 02 I want the result as Developer,Oem 01,Dist 01 When I select Oem 01 I want the result to be Developer When I select Dist 01 I want the result to be Developer,Oem 01

I have tried with below code but it always return only Developer as a result

tree.on('select', function (e, node, id) {
         selectednode = node; 
	 var result = tree.parents(id);
         alert(result.join());
});

Please help !

TechAspirant avatar Feb 27 '19 11:02 TechAspirant

look the my answer for Treeview parents

Nuriman2 avatar Feb 28 '19 12:02 Nuriman2

Have you solved this problem ? because I have the same problem

andyyatma avatar Sep 04 '20 07:09 andyyatma