PDA

View Full Version : How to Add default event to GridPanel



xxbd123
10 Apr 2012, 7:32 PM
I wanna all gridpanel have selectionchange (http://localhost/docs/index.html#!/api/Ext.panel.Table-event-selectionchange) event;

Because I have some Grid in one Page,I need get currentGrid to do something;

such as :

var activeGrid

selectionchange (http://localhost/docs/index.html#!/api/Ext.panel.Table-event-selectionchange):function(){
activeGrid = this;
}

then i can get currentGrid. thanks

scottmartin
11 Apr 2012, 6:12 AM
You can use something like:




mygrid.getSelectionModel().on('select', function(selModel, model, idx) {
// code here
}, this);


Regards,
Scott