View Full Version : enableColumnHide: false is not working in grid after calling afterrender event

28 Jun 2014, 3:30 AM
In my grid i am doing like this

in after render event

afterrender: function(grid, eOpts) {
var clIds = colmnFlds.split(',');
for(var i = 0; i < clIds.length; i++) {
var id = clIds[i];
if(grid.columns[id] != undefined) {

In the above code 'colmnFlds' fields are coming from database.
After that in columns i did like this

{text:'Id', dataIndex: 'id', hidden: true, enableColumnHide: false},
{text:'Name', dataIndex: 'name', hidden: true},

So in column fields i am getting 0,1 and so the two fields are showing in grid. But for the first field i don't want to enable column hide property.

If i remove that afterrender then enableColumnHide: false is perfectly working.

Please help me and correct me if i am doing wrong

Gary Schlosberg
10 Jul 2014, 7:16 AM
Are you setting enableColumnHide on individual columns? My understanding is that it is set on the grid itself. I don't think you can disable column hiding on just one column.