Sigh...
ujung2-nya saya cuma override methodnya aja
columns: [{
header: _('id'),
dataIndex: 'id',
sortable: true,
hidden: true,
width: 40
}, {
xtype: 'checkcolumn',
header: _('active'),
tooltip: _('active'),
dataIndex: 'active',
sortable: false,
width: 30,
processEvent : function(name, e, grid, rowIndex, colIndex){
if (name === 'mousedown') {
var record = grid.store.getAt(rowIndex);
record.set(this.dataIndex, !record.data[this.dataIndex]);
MODx.Ajax.request({
url: Doodles.config.connectorUrl,
params: {
action: 'mgr/doodles/updateFromGrid',
data: JSON.stringify(record.data)
},
listeners: {
'success': {
fn: function(){
Ext.getCmp('doodles-grid-doodle').refresh();
}
}
}
});
return false;
} else {
return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
}
}
}]