Skip to main content

enable()

pro version only

This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.

enables the RangeSelection module and activates the capabilities of range selection in Grid

Usage

enable(): void;

Example

// this example shows enabling the module after deactivation
const grid = new dhx.Grid("grid_container", {
// other configuration
columns: [
{ id: "a", header: [{ text: "A" }] },
{ id: "b", header: [{ text: "B" }] },
],
data: [
{ id: "1", a: "A1", b: "B1" },
{ id: "2", a: "A2", b: "B2" },
],
rangeSelection: { disabled: true } // disabled on initialization
});

grid.range.enable(); // activating the module
grid.range.setRange({ xStart: "a", yStart: "1" }); // the range will be set

Change log:

added in v9.2