Hi, I have a datagrid side by side with a Tree. Clicking a row in the grid expands, selects and scollTo that node in the Tree However selected Tree node becomes outside the window as the animation has not finished when scrollTo executes. The node becomes visible in the window for a split second but is moved down and outside the window as the animation continues. When animation is ready, the selected node is outside the window. If I turn animation off, it works fine. How can I make the scrollTo wait for the animation before start scrolling to the node so it becomes visible when done?
$('#dg').datagrid({
title: 'dg',
...
onSelect: function (index, row) {
var node = $('#tree').tree('find', row.Code);
$('#tree').tree('expandTo', node.target).tree('select', node.target);
$('#tree').tree('scrollTo', node.target);
}
});