PDA

View Full Version : Grid Column data not hiding properly



Rammynampati
15 Nov 2009, 11:25 PM
HI All,
I have grid with columns

{id:'matrixListDesc', header: "Description", dataIndex: 'matrixListDesc', width: 100,renderer: this.checkRenderer},
{id:'matrixListMax', header: "Max", dataIndex: 'matrixListMax',width: 50,renderer: this.checkRendererValue},
{id:'matrixListMin', header: "Min", dataIndex: 'matrixListMin',width: 50,renderer: this.checkRendererValue},I have these conditions to hide Max, Min


,checkRenderer : function(val){
if(val != "Range")
{
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(4, true);
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(5, true);
}
else{
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(4, false);
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(5, false);
}
return val;
},checkRendererValue : function(val){
if(val == 0)
{
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(4, true);
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(5, true);
}else{
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(4, false);
Ext.getCmp('matrixDetails-list-view').getColumnModel().setHidden(5, false);
}
return val;
}But it is not happening properly..Please help me in this. Please find the attached screen shot. Thanks In advance.

Rammynampati
16 Nov 2009, 3:11 AM
Is it achievable through Editable Grid only??