PDA

View Full Version : can't setRenderer grid (Dynamis) on EXTJS 4 ??



andomichael
3 Jul 2012, 7:17 PM
If i'm using ExtJS 3, i'm using this :



grid.getColumnModel().setRenderer(2,functionRender);


but it's not work in ExtJS 4, :(
getColumnModel function it's undefined, so i try to use :



grid.getCmp('columnid').setRenderer(functionRender);

but that still not work, i'm not using getHeaderCt function because getHeaderCt can't use on locked column grid in ExtJS 4, so i use getCmp function.
please somebody help me.(:|

sword-it
3 Jul 2012, 11:30 PM
Hi andoMichael,
Try the code given below.




var column= this.getView().getGridColumns(); // return all the columns of grid.
column[columnIndex].renderer = function(value){
return value ; // return column value
}

andomichael
4 Jul 2012, 12:04 AM
Hi andoMichael,
Try the code given below.




var column= this.getView().getGridColumns(); // return all the columns of grid.
column[columnIndex].renderer = function(value){
return value ; // return column value
}



it's work!!
thank's so much....:)