TX Text Control .NET Server

Javascript: TableCellCollection.getItem Method

Method|Introduced in 28.0

Description

Gets the cell with the specified row and column number.

Syntax

<void> TableCellCollection.getItem(<RequestTableCellCallback> callback, [<ErrorCallback> errorCallback], <number> row, <number> column)

Parameters

ParameterDescription
callback

Receives the table cell.

errorCallback

Optional. Is called when the operation failed with an error.

row

The 1-based row index.

column

The 1-based column index.

Examples

The following example demonstrates TableCellCollection.getItem in a practical document-editing workflow. It gets the cell with the specified row and column number.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectItem(tableCells) {
    tableCells.getItem(
        function(cell) {
            if (!cell) {
                console.warn("No table cell was returned.");
                return;
            }
            
            console.log("get item result:", cell);
        },
        onTxError,
        3,
        3
    );
}