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); }); 

found here: https://www.sencha.com/forum/showthread.php?251980-scrolling-to-specific-node-in-tree-panel&p=923068#post923068


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -