Web Components Spreadsheet Activation
The Web Components Spreadsheet component exposes properties that allow you to determine the currently active cell, pane, and worksheet in the control. This is helpful as it can help you to determine where the user may be navigating or editing in the control.
Web Components Spreadsheet Activation Example
Activation Overview
The activation of the Web Components IgcSpreadsheetComponent
control is split up between the cells, panes, and worksheets of the current workbook
of the spreadsheet. The three "active" properties are described below:
activeCell
: Returns or sets the active cell in the spreadsheet. To set it, you must create a new instance ofSpreadsheetCell
and pass in information about that cell, such as the column and row or the string address of the cell.activePane
: Returns the active pane in the currently active worksheet of the spreadsheet control.activeWorksheet
: Returns or sets the active worksheet in theworkbook
of the spreadsheet control. This can be set by setting it to an existing worksheet in theworkbook
attached to the spreadsheet.
Code Snippet
The following code snippet shows setting activation of the cell and worksheet in the IgcSpreadsheetComponent
control:
this.spreadsheet.activeWorksheet = this.spreadsheet.workbook.worksheets(1);
this.spreadsheet.activeCell = new SpreadsheetCell("C5");