I need to show/hide columns of a grid on the fly, but it seems that ExtJs 4 has no implemented method for that.
In previous versions I should use columnModel, what doesn't exist anymore.
Just get grid.columns[index]
and hide()
or show()
doesn't affect the grid.
Use grid.columnManaget.getColumns()[index].hide()
can really hide the column, but it cannot be shown again (as getColumns()
does not return that column after that).
grid.columnManager.headerCt.items.get(0).setVisible(false);
– Nickell