PDA

View Full Version : Editing CheckColumn on grid



BoroChris
21 Mar 2012, 1:10 AM
I cannot seem to get the editor to fire on a check column.
This is the code I am using (maybe missing a few closing brackets as I have cut loads out).

Ext.create("Ext.grid.Panel",{frame:true,height:650,id:"KVGidid",store:myData,title:"Check in Status",
viewConfig:{getRowClass: function (row, index) {return colourGrid(row, index)},
stripeRows: false},features:[{ftype:"grouping",id:"itemkioskViewgrid289"}]
,columns:[{dataIndex:"clinic",id:"columnkioskViewgrid154",sortable:true,text:"Clinic",xtype:"gridcolumn"}
,{dataIndex:"notes",field:"checkcolumn",id:"notes",text:"notes",xtype:"checkcolumn",
editor:{id:"editorkioskViewgrid239",xtype:"textfield"}
}]
,plugins:[{clicksToEdit:1,id:"itemkioskViewgrid243",ptype:"cellediting",listeners:{
edit:function(editor,e) {alert('got edit');}
}]})

I have tried using checkchange in place of edit and also putting the xtype to checkcolumn on the editor, as well as most other combinations that I could think of but nothing I do seems to get the event to fire.

Can anyone help?

mitchellsimoens
21 Mar 2012, 9:04 AM
The checkchange should fire on the column


{
xtype: 'checkcolumn',
header: 'Indoor?',
dataIndex: 'indoor',
width: 55,
listeners : {
checkchange : function() {
console.log('hi');
}
}
}

BoroChris
22 Mar 2012, 3:34 AM
Thank you that worked fine.
It's a bit of a pain that it acts differently to all the other grid widgets but I guess that as it is a ux that is to be expected.
Was a suprise that this wasn't included in the main for ext4.