T Rao
T Rao

Reputation: 49

Remove columns in dgrid dynamically

I am creating a dgrid using columnHider. I was able to hide/show columns using this.dgridTable.toggleColumnHiddenState(columnId, hidden);

However, I want to altogether remove specific columns from view(including the column hider menu). Is there a way to do this without re-creating the grid with a new set of columns?

Upvotes: 0

Views: 134

Answers (1)

Jean-Claude Hujeux
Jean-Claude Hujeux

Reputation: 401

You should be able to use this.dgridTable.set('columns', newColumnsDescription);. It does update the column hider menu as well.

You will have to build newColumnsDescription to reflect the addition / removal of columns as per your needs.

Upvotes: 0

Related Questions