I have a Kendo UI Web treeview configured to do OnDemand loading from a remote dataservice using JSON and ODATA. This is working very well, and I have been very pleased.
My issue comes to light when programmatically selecting a node in the tree, and then clicking its expand icon. What occurs is that the selection immediately jumps to the first root node. However, if before or after expanding, you manually select (using your mouse) a node then this behavior stops occurring.
I also notice that when programmatically selecting a node I lose my focused node, but that the focus returns whenever a manual selection is made (using your mouse).
I am not sure that these behaviors are related in anyway, and frankly I do not need the focus, my big issue is the selection changing when all that is done is merely expanding the selected node.
So, to recreate:
1) Setup a treeview in the fashion I described above (with 4 levels)
2) Load the treeview's root nodes (1st level) (rest of the nodes are loaded on-demand when expand occurs)
3) Programmatically expand the first root node to the 3rd level down (arbitrary level #)
3) Programmatiically select this node (with children) on the 3rd level
4) Now it is time for the user to interact with the tree (Notice at this point how no node has focus (cant keyboard navigate)
5) Merely, expand the currently selected node to view its children
6) Notice, the selection has jumped to the first root level node (but also notice now how this node has focus)
As I said before, my most impeding issue at this point is the selection changing.
Do you know how I can prevent the selection from changing when I just expand the programmatically selected node?
Thanks,
Lee
My issue comes to light when programmatically selecting a node in the tree, and then clicking its expand icon. What occurs is that the selection immediately jumps to the first root node. However, if before or after expanding, you manually select (using your mouse) a node then this behavior stops occurring.
I also notice that when programmatically selecting a node I lose my focused node, but that the focus returns whenever a manual selection is made (using your mouse).
I am not sure that these behaviors are related in anyway, and frankly I do not need the focus, my big issue is the selection changing when all that is done is merely expanding the selected node.
So, to recreate:
1) Setup a treeview in the fashion I described above (with 4 levels)
2) Load the treeview's root nodes (1st level) (rest of the nodes are loaded on-demand when expand occurs)
3) Programmatically expand the first root node to the 3rd level down (arbitrary level #)
3) Programmatiically select this node (with children) on the 3rd level
4) Now it is time for the user to interact with the tree (Notice at this point how no node has focus (cant keyboard navigate)
5) Merely, expand the currently selected node to view its children
6) Notice, the selection has jumped to the first root level node (but also notice now how this node has focus)
As I said before, my most impeding issue at this point is the selection changing.
Do you know how I can prevent the selection from changing when I just expand the programmatically selected node?
Thanks,
Lee