Treeview - Highlighting selected nodes

0 Answers 104 Views
TreeView
Harry
Top achievements
Rank 1
Harry asked on 22 Jul 2024, 06:11 PM | edited on 29 Jul 2024, 03:55 PM

Hi,

So I have created a treeview and have kendoTreeViewSelectable added to it which allows me to work with the items I have selected. That part, I was able to get working correctly so when I select an item in the treeview, the parent node of that item is also added to the selectedKeys and it "highlights" both the item and its parent(s). The issue that I am running into now is, when I select an item and then select it again, the item I clicked on is no longer highlighted but its parent(s) are. I want to set it up so that it stays selected. 

I've tried a few approaches like not running the method I have for selecting the parent nodes if the current item Id matches the one clicked on and also by resetting the selectedKeys array and trying to run my method but both don't seem to do anything. 

Any suggestions on what I could do?

Thanks,

Harry

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Harry
Top achievements
Rank 1
Share this question
or