This is a migrated thread and some comments may be shown as answers.

Deselect method

1 Answer 108 Views
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 08 Apr 2012, 11:52 AM
A treeview start out with no nodes selected.  Once a node is selected there is always a selected node -- you can't click on the selected node to deselect it.

Does anyone have a way to deselect a node when the selected node is clicked on ?

Why you might ask ?  I am trying to use a tree in a way that allows multiple nodes or none to be selected.

1 Answer, 1 is accepted

Sort by
0
Nigel
Top achievements
Rank 1
answered on 21 May 2012, 11:58 AM
A bit of coffeescript that I'm using to do this - seems to work OK

node = treeview.select()
if node?
node.find("span.k-state-selected").removeClass("k-state-selected")
Asked by
Richard
Top achievements
Rank 1
Answers by
Nigel
Top achievements
Rank 1
Share this question
or