In my grid i am doing like this
In the above code 'colmnFlds' fields are coming from database.
After that in columns i did like this
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.
in after render event
Code:
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) {
grid.columns[id].show();
}
}
},
In the above code 'colmnFlds' fields are coming from database.
After that in columns i did like this
Code:
{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
Aucun commentaire:
Enregistrer un commentaire