Skip to main content

resetRange()

pro version only

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

resets the current selection range

Usage

resetRange(): boolean;

Returns:

true - on success, false if the module is disabled, or if reset is canceled by an event.

Example

// this example shows resetting of the current range 
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.resetRange();
console.log(grid.range.getRange()); // -> null

Change log:

added in v9.2