extjs - Unable to scroll to a tree node -
i have treepanel
, 1 procedure expands tree , selects 1 particular node. problem - not know how scroll node, becomes visible. tried these 2 methods, i've seen @ stackoverflow , other forums:
1. tree.getselectionmodel().select(node); tree.getview().focusrow(node); 2. location.hash=node.data.id;
take @ this: http://jsfiddle.net/slemmon/p9tkz/3/. may have use tree.selectpath instead of selectionmodel:
tree.selectpath('/root/path/to/your/node', 'text', '/', function (s, n) { var nodeel = ext.get(tree.view.getnode(n)); nodeel.scrollintoview(tree.view.el, false, true); });
Comments
Post a Comment