A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.ag-grid.com/javascript-data-grid/cell-selection-api-reference/ below:

JavaScript Grid: Cell Selection API Reference

Configuration API Copy Link

boolean

default: false

If true, only a single range can be selected

boolean

If true the header of cells containing ranges will be highlighted.

handleCopy Link

RangeHandleOptions | FillHandleOptions

Determine the selection handle behaviour. Can be used to configure the range handle and the fill handle.

Selection Events Copy Link

CellSelectionChangedEvent

A change to cell selection has occurred.

FillStartEvent

Fill operation has started.

FillEndEvent

Fill operation has ended.

As an example to illustrate the cellSelectionChanged event, if selecting a range of 5 cells in a row, the user will click the first cell and drag to the last cell. This will result in up to 7 events. The first and last cell in the range will cause two events each. This is due to the first cell firing an event with started=true, finished=true upon mousedown with an additional event started=true, finished=false while in the range, and the last cell firing an event started=false, finished=false as soon as it is in the range and then again started=false, finished=true upon the end of cell selection. All the intermediary events will have one event with both started and finished as false. This is illustrated in the table:

User action started finished mousedown in first cell true true mousemove in first cell true false mousemove in intermediate cells false false mousemove in final cell false false mouseup in final cell false true

The example below also illustrates this by logging the event fields in the console:

Editing Events Copy Link

CellEditRequestEvent

Value has changed after editing. Only fires when readOnlyEdit=true.

CellSelectionDeleteStartEvent

Cell selection delete operation (cell clear) has started.

CellSelectionDeleteEndEvent

Cell selection delete operation (cell clear) has ended.

Cell Selection API Copy Link

The following methods are available on the GridApi for managing cell selection.

Function

Returns the list of selected cell ranges. The start is the first cell the user clicked on and the end is the cell where the user stopped dragging. Do not assume that the start cell's index is numerically before the end cell, as the user could have dragged up.

CellSelectionModule

Function

Adds the provided cell range to the selected ranges. This keeps any previous ranges. If you wish to only have the new range selected, then call clearCellSelection() first.

CellSelectionModule

Function

Clears the selected cell ranges.

CellSelectionModule

Cell ranges are normally bounded by a start and end row. However it is also possible to define a range unbounded by rows (i.e. to contain all rows). When adding an unbounded range via gridApi.addCellRange, do not provide start or end row positions.

Row positions are defined by a row index and pinned. Row indexes are integers starting at zero. Pinned can be either 'top' (row is in pinned top section), 'bottom' (row is in pinned bottom section) or null (row is in the main body). See Row Pinning for information on row pinning.

Ranges are defined by a list of columns. Pass in either a) a list of columns or b) a start and end column and let the grid work out the columns in between. Passing a list of columns instead of a start and end column has the advantage that the columns do not need to be contiguous.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4