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.
4
votes
4 Answers
8
votes
5
votes
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
}
}
}
0
votes
0
votes
if You are going to or want to fire the ajax request on the check change event. I think this will help for you.
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) {
Ext.Ajax.request({
url: 'abc.com/index.php',
scope: this,
params: { postData: postdata },
method: 'POST',
success: function (a) {
}
});
}
}
]