Deselect method

2 posts, 0 answers
  1. Richard
    Richard avatar
    148 posts
    Member since:
    Feb 2012

    Posted 08 Apr 2012 Link to this post

    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.
  2. Nigel
    Nigel avatar
    2 posts
    Member since:
    Mar 2012

    Posted 21 May 2012 Link to this post

    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")
Back to Top