سؤال

I am trying to find all the selected highest level nodes For example if I have tree like
-grandparent1
--parent1
---child1
---child2
--parent2
---child3
---child4
If some one selects child1,child2,child3 I need result like parent1,child3 Please help me out on this. Thanks in advance

هل كانت مفيدة؟

المحلول

You can get the key path upto root parent using below:

node.getKeyPath()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top