Remove Grid Columns Dynamically in Extjs 4

Code snippet for removing columns in real time from an Extjs 4 grid.

var myComp = myGrid.headerCt.getComponent(colIdForRemoval);
myGrid.headerCt.remove(myComp);
myGrid.getView().refresh();

When you create the columns in the grid you will need to specify an id: even when you are using a dataindex:

Comments

Popular posts from this blog

Getting Started: Quick Setup for GXT 3 (includes reset.css link how to)

How to setup GXT 3 examples, samples and demos

ExtJs4 : Dynamically Add Columns