What is the equivalent to the ExtJs3 Ext.grid.ColumnModel
in ExtJs4?
What I want to do is hide a column, I did something like below in ExtJs3:
grid.colModel.setHidden(1, true);
What is the equivalent to the ExtJs3 Ext.grid.ColumnModel
in ExtJs4?
What I want to do is hide a column, I did something like below in ExtJs3:
grid.colModel.setHidden(1, true);
Another solution more flexible :
You can change
dataIndex
for another property likename
or whatever.You can hide/show column using setVisible method of Ext.grid.column.Column:
Ext.grid.header.Container
code of Ext.panel.Table:
so u can use
The other answers can be problematic if your column indexes change.
Here is another solution:
Set itemId on the column definition:
Then to hide: