-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
I need to hide / show columns of the grid after it is loaded (based on some permissions). I wasn't able to find a method in the grid api to call that can do it for me.
As a workaround, i am doing what hide column context menu is doing. Something like:
this.gridApiInterface.grid.columns[0].colDef.visible = hasDeletePermission;
this.gridApiInterface.grid.columns[0].visible = hasDeletePermission;
this.gridApiInterface.grid.queueGridRefresh();
this.gridApiInterface.grid.api.core.notifyDataChange(uiGridConstants.dataChange.COLUMN); this.gridApiInterface.grid.api.core.raise.columnVisibilityChanged(this.gridApiInterface.grid.columns[0]);
Having a quick method to do it would help.
Secondly, it will also be worthwhile to expose method to update 'enableRowHeaderSelection' property to control the visibility of selection column.