Skip to main content

disable()

pro version only

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

disables the RangeSelection module and resets the current range in Grid

Usage

disable(): void;

Example

// this example shows disabling of the module
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: true
});

grid.range.setRange({ xStart: "a", yStart: "1" });
grid.range.disable(); // disabling the module
console.log(grid.range.getRange()); // -> null
grid.range.setRange({ xStart: "a", yStart: "1" }); // the range won't be set

Change log:

added in v9.2