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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -