Search.../

onCellSelect( )

Adds an event handler that runs when a table cell is selected.

Description

A table receives a TableCellEvent when the table is set set in the Editor to select cells when clicked. Clicking Selects Cells

Syntax

function onCellSelect(eventHandler: TableCellEventHandler): Table
eventHandler: function TableCellEventHandler(event: TableCellEvent): void

onCellSelect Parameters

NAME
TYPE
DESCRIPTION
eventHandler

The name of the function or the function expression to run when the cell is selected.

Returns

The table that triggered the event.

Return Type:

TableCellEventHandler Parameters

NAME
TYPE
DESCRIPTION
event

The table cell event that occurred.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

Get the selected table cell information

Copy Code
1$w("#myTable").onCellSelect( (event) => {
2 let cellColId = event.cellColumnId; // "columnId_b2b3-87d9-49250"
3 let cellData = event.cellData; // "John"
4 let cellRowIndex = event.cellRowIndex; // 1
5} );