PDA

View Full Version : How to programatically select an item in Ext.view.View



stevo.zilik
1 Sep 2012, 11:03 AM
Hi guys

I have a standard Ext.view.View bound to an ajax store and need to select an item programatically (so it changes it's visual state to selected and fires selectionchange event.

Any ideas?

Thanks,
Stevo

vietits
1 Sep 2012, 3:29 PM
You can use <dataview>.getSelectionModel().select(...) (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.selection.Model-method-select) or <dataview>.select(...) with the same syntax as the first one.