columnChooser

Specifies the options of a column chooser.

Type:

Object

A column chooser is a grid element that allows a user to hide specific grid columns. This element represents a panel that appears when the user clicks DevExtreme DataGrid ColumnChooser, or when the showColumnChooser() method is called.

A grid column must have the allowHiding option set to true so that a user can drag it onto the column chooser panel.

By default, the column chooser is disabled. To enable it, set the enabled option of the columnChooser object to true. Using the width and height options of this object, you can define the size of the column chooser panel.

In addition, you can customize the text displayed by the panel when it is empty using the emptyPanelText option and the text displayed in the title of the panel using the title option.

emptyPanelText

Specifies text displayed by the column chooser panel when it does not contain any columns.

Type:

String

Default Value: 'Drag a column here to hide it'

enabled

Specifies whether a user can invoke the column chooser or not.

Type:

Boolean

Default Value: false

When this option is set to true, a user can invoke the column chooser by clicking DevExtreme DataGrid ColumnChooser in the upper-right corner of the grid. Otherwise, this button is hidden, but the column chooser can still be invoked in code using the showColumnChooser() method.

height

Specifies the height of the column chooser panel.

Type:

Number

Default Value: 260

mode

Specifies how the end-user chooses columns.

Type:

String

Default Value: 'dragAndDrop'
Accepted Values: 'dragAndDrop' | 'select'

In the "dragAndDrop" mode, the end-user moves column headers to the column chooser and back by drag-and-drop. In the "select" mode, the end-user selects column headers in the column chooser using check boxes. In both modes, the corresponding columns appear/disappear in the grid.

When displaying DataGrid on touch-enabled devices, it is more convenient to use the "select" mode. Yet on mouse-equipped clients, either mode is suitable.

When configuring the widget using ASP.NET MVC Wrappers, specify this option using the GridColumnChooserMode enum. This enum accepts the following values: DragAndDrop and Select.

title

Specifies text displayed in the title of the column chooser panel.

Type:

String

Default Value: 'Column Chooser'

width

Specifies the width of the column chooser panel.

Type:

Number

Default Value: 250