TX Text Control .NET Server

Javascript: TableCollection.setGridLines Method

Method|Introduced in 28.0

Description

Sets a value indicating wether table grid lines are shown or not.

Syntax

<void> TableCollection.setGridLines(<number> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

Specifies whether table grid lines are shown or not.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates TableCollection.setGridLines in a practical document-editing workflow. It sets a value indicating wether table grid lines are shown or not.

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

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.setGridLines(
        1,
        function() {
            console.log("set grid lines completed.");
        },
        onTxError
    );
}, onTxError);