In this example: http://demos.telerik.com/kendo-ui/treeview/api
, you can append nodes. When there is no element selected, it gets added to the tree with no parent. However, after selecting any node, doing that is no longer possible. There will always be a parent. I am aware of how to deselect all nodes programmatically:
$("#tree").data("kendoTreeView").select($());
But what I would like to do is have it such that if they click on any area within the tree that is not a node(ie, all the white space within the rectangle that isn't text), deselect the node. I've played around with various jquery selectors like :not(k-in) and :not(k-item) but haven't had any luck.
, you can append nodes. When there is no element selected, it gets added to the tree with no parent. However, after selecting any node, doing that is no longer possible. There will always be a parent. I am aware of how to deselect all nodes programmatically:
$("#tree").data("kendoTreeView").select($());
But what I would like to do is have it such that if they click on any area within the tree that is not a node(ie, all the white space within the rectangle that isn't text), deselect the node. I've played around with various jquery selectors like :not(k-in) and :not(k-item) but haven't had any luck.