View as Markdown

Columns

Column chooser

A searchable dialog that shows and hides columns, opened from the toolbar, the column menu or the API.

The column chooser lists the columns with a checkbox each. It opens from the toolbar 'columnChooser' item, anchored below the button, from the columnChooser column menu item, or from api.openColumnChooser(). Called with a viewport point, api.openColumnChooser({ x, y }) opens it there; without one it opens at the start of the grid. columnChooser={false} drops the columnChooser item from the column menu and disables the toolbar item.

A search box above the list narrows the columns by header text. columnChooser={{ searchOperator }} picks the match: 'contains' (default), 'startsWith', 'endsWith' or 'equal'. searchable: false removes the box (enableSearching), ignoreAccents: true folds diacritics so categorie finds "Catégorie" (ignoreAccent), and debounce delays the filtering while typing (immediateModeDelay; Enter applies at once).

Applying changes

In the default mode: 'confirm' the checkboxes are a draft: OK applies the changes and Cancel discards them. mode: 'immediate' applies every toggle at once. Either way the grid raises the cancelable onBeforeColumnVisibilityChange and then onColumnVisibilityChange with the hidden and shown columns, and onBeforeColumnChooserOpen fires before the chooser opens with the listed columns (call preventDefault() to keep it closed). The chooser is a labelled role="dialog": focus moves into it, Escape closes it and returns focus to the element that opened it.

A column with hideable: false is left out of the list, so the chooser can never hide it. Under stacked headers the list is an indented tree of the groups and their leaves; a group checkbox toggles all of its leaves.

Column chooser

Open demo

The column chooser opened from the toolbar item, from api.openColumnChooser() or at a viewport point, with a search box, a configurable searchOperator, the confirm and immediate modes, and a column kept out of the list with hideable: false.

Order
Customer
Country
City
Product
Category
Quantity
Amount
ORD-10000
Jun Park
Japan
Osaka
Grinder
Equipment
2
$219.30
ORD-10001
Dewi Lestari
Germany
Munich
Pour-over kit
Equipment
1
$42.00
ORD-10002
Jun Park
France
Lyon
Filter beans
Coffee
6
$79.80
ORD-10003
Ines Duarte
Malaysia
Penang
Green tea
Tea
10
$92.50
ORD-10004
Elif Kaya
Germany
Berlin
Pour-over kit
Equipment
12
$428.40
ORD-10005
Farah Aziz
France
Reims
Grinder
Equipment
4
$490.20
ORD-10006
Farah Aziz
Malaysia
Kuala Lumpur
Pour-over kit
Equipment
8
$319.20
ORD-10007
Bao Nguyen
Malaysia
Kuala Lumpur
Espresso beans
Coffee
4
$66.60
ORD-10008
Farah Aziz
Portugal
Porto
Green tea
Tea
5
$41.63
ORD-10009
Jun Park
Japan
Osaka
Grinder
Equipment
10
$1,290.00
ORD-10010
Jun Park
Portugal
Porto
Pour-over kit
Equipment
12
$428.40
ORD-10011
Goran Petrov
Japan
Tokyo
Green tea
Tea
8
$62.90
ORD-10012
Goran Petrov
Japan
Osaka
Green tea
Tea
4
$31.45
ORD-10013
Hana Sato
Germany
Berlin
Filter beans
Coffee
12
$168.00
ORD-10014
Dewi Lestari
Malaysia
Kuala Lumpur
Green tea
Tea
7
$64.75
ORD-10015
Dewi Lestari
Germany
Munich
Grinder
Equipment
3
$387.00
ORD-10016
Farah Aziz
Malaysia
Kuala Lumpur
Kettle
Equipment
12
$700.92
ORD-10017
Aiko Tan
Germany
Munich
Filter beans
Coffee
7
$88.20
ORD-10018
Bao Nguyen
Malaysia
Kuala Lumpur
Grinder
Equipment
10
$1,096.50
ORD-10019
Aiko Tan
France
Lyon
Oolong tea
Tea
6
$76.50
No events yet.

Templates

renderHeader adds content above the search box and renderFooter replaces the OK / Cancel buttons; renderChooser replaces the search box and the list. Each receives the listed columns (field, header, draft hidden, matches, and the public column view), the searchText and setSearchText(text), setHidden(fields, hidden), apply(), close(), and defaultContent (the built-in part it replaces), so a template can decorate the built-in UI instead of rebuilding it.

Column chooser templates

Open demo

The toolbar column chooser with stacked header groups, accent-insensitive debounced search, a header line, a custom footer action, and openColumnChooser({ x, y }).

Order
Client
Région
Produit
Quantité
Montant
Commandé
Pays
Ville
ORD-10000
Aiko Tan
France
Lyon
Oolong tea
7
75,86 €
25 nov. 2026
ORD-10001
Hana Sato
Germany
Berlin
Filter beans
9
107,10 €
23 mars 2026
ORD-10002
Bao Nguyen
Japan
Osaka
Grinder
5
612,75 €
4 nov. 2026
ORD-10003
Farah Aziz
Malaysia
Penang
Kettle
8
519,20 €
4 juin 2026
ORD-10004
Goran Petrov
Malaysia
Penang
Green tea
6
55,50 €
8 mai 2026
ORD-10005
Chen Wei
Japan
Osaka
Green tea
12
105,45 €
14 août 2026
ORD-10006
Jun Park
Japan
Tokyo
Espresso beans
4
74,00 €
28 août 2026
ORD-10007
Chen Wei
Japan
Osaka
Filter beans
11
130,90 €
1 oct. 2026
ORD-10008
Aiko Tan
France
Lyon
Oolong tea
2
22,95 €
10 févr. 2026
ORD-10009
Dewi Lestari
Germany
Munich
Espresso beans
1
17,58 €
25 août 2026
ORD-10010
Chen Wei
Japan
Osaka
Green tea
2
16,65 €
6 févr. 2026
ORD-10011
Farah Aziz
Germany
Munich
Oolong tea
6
68,85 €
16 mars 2026
ORD-10012
Hana Sato
Germany
Munich
Filter beans
2
23,80 €
5 mars 2026
ORD-10013
Jun Park
Japan
Osaka
Oolong tea
12
130,05 €
6 juil. 2026
ORD-10014
Aiko Tan
France
Lyon
Kettle
8
519,20 €
27 févr. 2026
ORD-10015
Hana Sato
Malaysia
Kuala Lumpur
Grinder
3
367,65 €
28 janv. 2026
ORD-10016
Farah Aziz
France
Reims
Grinder
3
348,30 €
4 août 2026
ORD-10017
Jun Park
Malaysia
Penang
Green tea
12
111,00 €
15 janv. 2026
ORD-10018
Chen Wei
Malaysia
Penang
Grinder
5
645,00 €
1 juil. 2026
ORD-10019
Goran Petrov
Japan
Osaka
Filter beans
5
59,50 €
24 févr. 2026
No events yet.

API reference

DataGridColumnChooser lists the columnChooser options and DataGridColumnChooserContext the template context; DataGridColumnChooserOpenEvent and DataGridColumnVisibilityChangeEvent are the event payloads, and openColumnChooser is on DataGridApi.