PDA

View Full Version : how do i Clear all selections in Ext.tree.Panel? Ext JS 4.1



Ibrahimp
4 Sep 2012, 1:00 AM
how do i Clear all selections in Ext.tree.Panel? Ext JS 4.1

Thanks.

Farish
4 Sep 2012, 1:09 AM
this works in 4.0.7:


Ext.getCmp('tree_id').getSelectionModel().deselectAll();

Ibrahimp
5 Sep 2012, 12:20 AM
Thanks Farish,
but will this work with Ext JS 4.1?

Farish
5 Sep 2012, 12:24 AM
try it and then let us know as well :)

eknight
19 Nov 2013, 11:17 AM
Ext.getCmp('tree_id').getSelectionModel().deselectAll();

Still works in 4.2.1, as long as you have an id on your treepanel. To use aliases instead of id's, you'll need to navigate with .up('panel_alias') and .down() to find your treepanel.