extjs - custom getCellEditor -
i use custom celleditor in grid:
getcelleditor: function(colindex, rowindex) { var field = this.getdataindex(colindex); if (field == 'value') { if ( type == 3 ) { return this.editors['number']; } else if ( type == 1 ) { return this.editors['select']; } else if ( type == 4 ) { return this.editors['checkbox']; } } return ext.grid.columnmodel.prototype.getcelleditor.call(this, colindex, rowindex); } },this);
type - record.get('type') grid.store. how know type in getcelleditor ? (i don't want use global variable :) )
you can use rowindex
parameter, access 'type' current row in grid:
grid.store.getat(rowindex).data.type
Comments
Post a Comment