TX Text Control .NET Server

Javascript: TableRow.getCellFormat Method

Method|Introduced in 28.0

Description

Gets the formatting attributes of a table row.

Syntax

<void> TableRow.getCellFormat(<RequestCellFormatCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the row's formatting attributes.

errorCallback

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

Examples

The following example demonstrates TableRow.getCellFormat in a practical document-editing workflow. It gets the formatting attributes of a table row.

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

function inspectCellFormat(tableRow) {
    tableRow.getCellFormat(
        function(format) {
            if (!format) {
                console.warn("No table cell format was returned.");
                return;
            }
            
            console.log("get cell format result:", format);
        },
        onTxError
    );
}