Skip to content

Column visibility

Every data column can be hidden and shown again from the toolbar’s View popover or from its own header menu. Start with some hidden, keep one always on, and let persist remember the choice.

Noah MüllerDataLeadInvitedFree$0.001Jan 30, 2026
Arjun OkaforGrowthLeadPausedEnterprise$3,950.0050Nov 13, 2024
Vihaan BoseSalesLeadChurnedFree$0.001Mar 2, 2026
Olivia NairGrowthManagerChurnedEnterprise$0.0043Jun 9, 2023
Meera OkaforResearchDirectorActiveTeam$841.0029Sep 27, 2026
Omar RossiPlatformPMChurnedEnterprise$0.0051Aug 22, 2026
Leila IyerPlatformPMPausedTeam$1,711.0059Jan 4, 2026
Omar GarciaFinanceLeadActiveFree$0.001Sep 11, 2024
Kavya OkaforDesignInternActiveFree$0.001Dec 8, 2023
Ananya BoseFinanceDirectorInvitedFree$0.001Jan 12, 2025
60 rows
Page 1 of 6

View in the toolbar opens DataGridViewOptions: a search box, a checkbox per column, Show all and Reset view. The button carries an “n hidden” badge while anything is hidden. Each row shows the column’s label, a pin icon if it is pinned, and an eye for its state. Only columns that can be hidden are listed; the utility columns (select, expander, rowNumber, actions) never are.

Reset view does more than visibility: without persist it resets visibility, order, sizes and pinning to the column definitions; with persist it calls grid.views.reset(), which also restores sorting, grouping, density and page size, and drops the active saved view.

The ⋮ menu on a header ends with Hide column. Get it back from View.

<DataGrid initialState={{ columnVisibility: { notes: false, country: false } }} />

columnVisibility maps column ids to booleans; anything not listed is visible. With persist on, the user’s last choice wins over initialState.

col.text("name", { header: "Name", enableHiding: false })

The column disappears from the View list and loses the Hide column item.

grid.table.state.columnVisibility // { notes: false }
grid.table.getColumn("notes")?.toggleVisibility()
grid.table.setColumnVisibility({ notes: false, country: false })
grid.table.toggleAllColumnsVisible(true)
grid.table.getVisibleLeafColumns()
  • A hidden column keeps its filter and its place in a sort, and the chip stays in the toolbar; clear it from the chip or show the column again.
  • Exports take visible columns by default (visibleOnly: true); pass grid.exportCsv(name, { visibleOnly: false }) for every exportable column.
  • Hiding every child of a group header hides the group.
  • Visibility is part of the persisted view and of saved views, so with persist the choice comes back on the next visit and can be named; see persistence.
  • The grouping bar, filter chips and View list all use the column’s label (or header string), so give a column with a function header a label.
Option Type Default What it does
enableHiding (column) boolean true false keeps the column always on.
initialState.columnVisibility object {} Column ids mapped to false start hidden.
columns the toolbar true Show the View button: toolbar={{ columns: false }} hides it.
persist boolean, string or object off Remember visibility (and the rest of the view).
table.enableHiding boolean true Hiding for the whole grid.
Labels strings English view, searchColumns, hidden, showAll, resetView and hideColumn in labels; see internationalisation.