I see the example in ExtJS, but it seems the checkColumn
doesn't update the XML. The API is also not so helpful. What I wanted to do is something like this. When the user clicks the checkbox in the grid it will send an AJAX request.
columns: [{
xtype: 'checkcolumn',
width: 30,
sortable: false,
id: 'check1',
dataIndex: 'check11',
editor: {
xtype: 'checkbox',
cls: 'x-grid-checkheader-editor'
},
listeners: {
checkchange: function (column, recordIndex, checked) {
alert(checked);
alert("hi");
}
}
}
]
worked for me :)
in extjs4 you can do this. there is the 'checkchange' event, so you can have something like this :
{
header: 'State',
dataIndex: 'STATE',
xtype: 'checkcolumn',
editor: {
xtype: 'checkbox',
cls: 'x-grid-checkheader-editor'
},
listeners: {
checkchange: function(column, recordIndex, checked) {
console.log(checked);
//or send a request
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With