Reputation: 345
I have used check box model in the grid panel and it can Checked All. i have got the value when it is checked or unchecked selected column. like this
var selModel = Ext.create('Ext.selection.CheckboxModel', {
checkOnly: true,
listeners: {
deselect: function(model, record, index) {
id = record.get('id');
alert(id);
},
select: function(model, record, index) {
id = record.get('id');
alert(id);
}
}
})
but how to get value when I click checked all?
Upvotes: 0
Views: 1474
Reputation: 74166
Use the selectionchange
event:
Fired after a selection change has occurred
Parameters:
this:
Ext.selection.Model
selected:Ext.data.Model[]
The selected records
eOpts: Object The options object passed toExt.util.Observable.addListener
.
Alternatively you can use the getSelection()
method in your select
event:
Returns an array of the currently selected records.
Upvotes: 1