DHTMLX Docs & Samples Explorer

Selection in Grid

Base selection operations

By default rows in grid can be selected by single click. Next commands can be used for program selection operations


Multi-Selection Mode

Multi-selection mode in the grid can be easily enabled in the following way:

        grid.enableMultiselect(true|false); // false by default

[Shift/Ctrl] keys should be used for selecting multiple rows at a time.

Block Selection

Starting from dhtmlxGrid v1.3, additional selection mode is supported in the grid - block selection. To activate this mode, the user needs to include dhtmlXGrid_selection.js file into the project.

It is possible to select any block of content and copy it to the clipboard in this mode. Block paste from the clipboard is also available.

Clearing Selection

The selection can be removed from the grid in the following way:


Selecting All Rows in Grid

The following method is responsible for selecting all rows in the grid: