javascript - Rendering a checkbox in a Ext.grid.EditorGridPanel -
i have web application uses lot of extjs. have ext.grid.editorgridpanel bound store, , need 1 of columns represented checkbox.
i believe i'm close - still having issues. specifically, when implement column in ext.grid.columnmodel so...
{ dataindex: 'isactive', header: 'active', editor: { xtype: 'checkbox', truetext: true, falsetext: false }, renderer: function(value) { homecoming "<input type='checkbox'" + (value ? "checked='checked'" : "") + " / >"; }, } well, sort of works. checkboxes appears upon initial render correctly checked or unchecked, depending on value database store. and, can check or uncheck checkbox within column, , store updates correctly.
the remaining problem is, however, since checkbox appears upon initial rendering , checkbox appears upon editing not same. hence, checkbox appears 'jump' within cell when click it. furthermore, after checkbox jumps, still in original checked or unchecked selection state. so, have check or uncheck again.
it appears work fine combobox, since want combobox retain value after select - select item want. , it's okay if combobox jumps during rendering. not checkbox though.
i'm kind of @ wit's end this. suggestions?
thanks in advance, tim
why not using xtype: 'checkcolumn'?
here example: http://docs.sencha.com/extjs/4.0.7/extjs-build/examples/grid/cell-editing.html
also checkbox selection can helpful: http://docs.sencha.com/extjs/4.0.7/extjs-build/examples/grid/grid-plugins.html
if need different allow me know.
javascript extjs checkbox
No comments:
Post a Comment