View Full Version : How to multi select nodes in TreePanel with MultiSelectionModel

25 Aug 2010, 7:05 AM

I can't programmatically select multiple nodes in TreePanel.
Here code

xtype: 'treepanel',
id: 'myTree',
selModel: new Ext.tree.MultiSelectionModel(),
listeners: {
click: function(node){
var sm = Ext.getCmp('myTree').getSelectionModel();
sm.select(item, true);
First: sm.select() unselect all already existing selections, even with keepExisting = true
Second: After the click all already existing selections also unselect

The second problem could be solved if there was an afterclick event, but it doesn't exist.

There must be some sort of solution to programmatically multi select nodes.

25 Aug 2010, 10:06 PM
First solved with sm.select(item, 'click', true);
Second with setTimeout()