Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dan on Dec 03, 2007 13:52
open dhtmlx forum
Ensure visibility, tree control

How can I ensure the visibility of an item in a tree? I am already expanding all parent items so the target item is being displayed.
I would like the control to scroll appropriately so a given item is visible. If the control handled the expansion of parent items too that would be great, but all I need is scrolling for now.

This describes the EnsureVisible routine for the standard Windows tree control:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.treenode.ensurevisible.aspx
Answer posted on Dec 04, 2007 02:22
can be done in next way

tree.openItem(tree.getParentId(itemID));   //this will opent all hierarchy from top to current item
tree.focusItem(itemID);          //this scroll tree, so item will be in visible area