Hey All,
Great example to implement some single click checkboxes!
However, I'm unsure how to push the update to my db?
I've tried utilizing the afteredit function, but I don't think it fires.
Can anyone lend a hand?
Thanks
-Nick
Hey All,
Great example to implement some single click checkboxes!
However, I'm unsure how to push the update to my db?
I've tried utilizing the afteredit function, but I don't think it fires.
Can anyone lend a hand?
Thanks
-Nick
What I ended up doing was making an AJAX call from the listener event. Works fine for my purposes!
I'm using Ext 2.0 and this seems to work alright as long as I don't click on the checkbox image itself. If I click in the empty cell around the image then cellclick fires, if I click on the image then cellclick never fires.
Am I missing something here?
you don't actually need this override for 2.0.
check out the EditorGrid example for 2.0:
http://extjs.com/deploy/dev/examples...edit-grid.html
and the associated js file on how it's done:
http://extjs.com/deploy/dev/examples/grid/edit-grid.js
I was able to get a checkbox on my grid using the code from the EditorGrid example but I am having trouble with it firing the afteredit event. If I edit one of my other fields, I see the red corner and then it fires the event. When I check or uncheck the check box it shows the red corner but does not fire the event. Any ideas on why it does not fire the event even though it appears that it is detecting the change? Thanks!
nothing extraordinary comes to mind.
post your code.
Ok I had the same problem and found this solution on this post.
http://extjs.com/forum/showthread.php?t=27161
Hope this helpsCode:this.on('cellclick',function(o, row, cell, e) { // ensure mouseclick occurred within checkbox icon's visible area if (o.getColumnModel().getDataIndex(cell) == 'indoor' && e.getTarget('.checkbox', 1)) { var rec = o.getStore().data.items[row]; rec.set('indoor', !rec.get('indoor')); // toggle "indoor" value o.fireEvent('afterEdit', { grid: o, record: rec, field: 'indoor', value: rec.get('indoor'), originalValue: !rec.get('indoor'), row: row, column: cell }); }});![]()