View Full Version : checkbox inside Ext.grid.EditorGridPanel (click once to trigger afteredit event)

4 Nov 2015, 2:01 AM
I have a checkbox column inside Ext.grid.EditorGridPanel configured like this:

{ id:'event-type-grid-enabled-checkbox', header:"Enabled", dataIndex:"enabled", sortable:true, clicksToEdit:1, editor:{ xtype:'checkbox', name:'enabled'}, renderer:function(val){return"<input type='checkbox'"+(val ?"checked='checked'":"")+">";}}

I want to be able to trigger the afteredit event of EditorGridPanel when user checks/unchecks the checkbox. There are other columns (textfields) beside checkbox column and user can double click and edit and they work perfectly fine, afteredit gets triggered and ajax call is made to update data and so on...

when i double click the checkbox then afteredit is triggered (which is technically right but not normal for a checkbox)

I tried clicksToEdit: 1 for the checkbox object but it doesn't seem to help.

I'm new to ExtJS and i'm working on an existing mature project which uses ExtJS version 3.2.1


Gary Schlosberg
11 Nov 2015, 7:57 AM
It doesn't look like a checkbox has the afteredit event. Here's a related thread, which seems to have a solution on the third page.

Perhaps it can be made to work with Ext JS 3.x.