TX Text Control .NET Server

Javascript: TableRow.setAllowPageBreak Method

Method|Introduced in 28.0

Description

Sets a value specifying how the table row is formatted at page breaks. The property value is True, if the table row can be formatted across page breaks. The property value is False, if the table row must not be formatted across page breaks.

Syntax

<void> TableRow.setAllowPageBreak(<boolean> allowPageBreak, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
allowPageBreak

Specifies how the table row is formatted at page breaks.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates TableRow.setAllowPageBreak in a practical document-editing workflow. It sets a value specifying how the table row is formatted at page breaks. The property value is True, if the table row can be formatted across page breaks. The property value is False, if the table row must not be formatted across page breaks.

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

function configureAllowPageBreak(tableRow) {
    tableRow.setAllowPageBreak(
        true,
        function() {
            console.log("set allow page break completed.");
        },
        onTxError
    );
}