Dear Team,
I am selecting the node in bottom of the tree on button click, i want to show the selected node by scrolling to that node.
Some thing like VirtualScrollTo in igGrid.
Please guide how to do this
Regards,
Bala
Hi Joe,
Thanks for the help.
it is working fine for first time , however when i expand all the nodes and try for the scroll , it is not scrolling to the selected node
can you please help me in this issue.
Thanks
Bala.R
Hello Bala,
Please view the attached sample for the functionality you are describing. Using the jQuery animate function with scrollTop, I was able to scroll to the selected node. You may need to play with the offset to get the scroll to your liking. Please let me know if I can be of further assistance.
Hi,
I have modified your code for my scenario.
Attached for your reference .
Bala.
Hi
Thanks for your reply.
I am having tree in a div which has scroll in it.if i select the node which is bottom of the tree on button click, i want the selected node in top of the div (scrollTop).
Hello Bala R,
I have found a way for you to achieve the functionality you were describing. You can see this in the sample which I have attached. In order to select a node and move to it, my sample first allows you to choose a node based on which parent and which child of that parent you want to select in the inputs. Once this is done, you can click on the Scroll button which will take you to the child you selected. To do this, I used the nodeByPath method to get a reference to the node we want to select. From there I called the select method on this node, and then the expandtoNode method. This gives you the behavior you are looking for. Please let me know if you need any clarification, or if I can be of further assistance.