-
15 Aug 2012 8:17 PM #1
Select Node Tree Panel Extjs 4 by Id
Select Node Tree Panel Extjs 4 by Id
How can i select node in tree panel by its id in extjs 4. Sample in extjs 2
when i use this method:treePanel.getNodeById(id).select();
its ouput nothingid='nodetrans';
treePanel.getSelectionModel().select(id);
but when i use index, like:
that's work..index=0;
treePanel.getSelectionModel().select(index);
But I want call id instead of index . Please help me
-
16 Aug 2012 2:06 AM #2
Hi agilene,
The tree.getSelectionModel().select(record) function can accept a record instance instead of an id. I would do something like this:
Code:var record = treePanel.getStore().getNodeById('item_id'); treePanel.getSelectionModel().select(record)
Working sample example - http://jsfiddle.net/TBa2E/
also see this thread - http://stackoverflow.com/questions/6...y-record-indexsword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
22 Aug 2012 6:04 PM #3
thanks Sword-It
i see now,, i put this
and works.Code:var record = store.getNodeById(tab.id); treePanel.getSelectionModel().select(record)


Reply With Quote