19

I would like to remove the column menu. I can simply display: none it, but it seems a waste to process and render it in the first place. I can only find options on how to edit items inside the menu in the docs. Thanks

Dominic
  • 62,658
  • 20
  • 139
  • 163

1 Answers1

41

Either setting menuTabs: [] or suppressMenu: true in the columnDefs. In this plunker the silver column demonstrates the first, while the bronze column demonstrates the second

Jarod Moser
  • 7,022
  • 2
  • 24
  • 52
  • Ah thanks I was trying to put it under the grid props rather than column def for each. Just verifying.. – Dominic Jan 24 '18 at 15:44
  • Is there any way to apply this dynamically, after the grid has been rendered? It seems that setting the property after the grid is ready doesn't do anything. – Jimmy May 22 '19 at 16:54
  • 1
    I was able to get it working with `this.gridOptions.columnApi.getAllColumns().forEach((c) => { this.gridOptions.api.getColumnDef(c.colId).menuTabs = []; });` – Jimmy May 22 '19 at 18:23
  • 7
    Instead of looping through all the columns, you might try adding `suppressMenu = true` to the `defaultColDef` of the grid. – Zdenek Hynek Oct 21 '19 at 10:24