Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.43 KB

selection_disable_method.md

File metadata and controls

47 lines (32 loc) · 1.43 KB
sidebar_label disable()
title disable selection method
description Turn the selection of cells off in DHTMLX Spreadsheet at runtime with the selection.disable() method, which removes the active cell and ignores selection by the mouse, the keyboard and the API.

disable()

Description

@short: Turns the selection of cells off

Usage

disable(): void;

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
    // config parameters
});
spreadsheet.parse(data);

spreadsheet.selection.disable();

Details

The method:

  • ends the editing of a cell and saves the entered value
  • removes the selected and the active cells on every sheet
  • ignores the selection by the mouse, the keyboard and the API until the enable() method is called

While the selection is turned off, the getSelectedCell() and getFocusedCell() methods return undefined. The other effects are the same as for the selection: false configuration option.

If the selection is already turned off, the method does nothing.

Change log: Added in v6.0.4

Related articles: