DS Server

Javascript: TXTextControl.setIsFormulaCalculationEnabled Method

Method|Introduced in 28.0

Description

Sets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.

Syntax

<void> TXTextControl.setIsFormulaCalculationEnabled(<boolean> enable, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
enable

Specifies whether formulas in tables are automatically calculated when the text of an input cell is changed.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates TXTextControl.setIsFormulaCalculationEnabled in a practical document-editing workflow. It sets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.

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

TXTextControl.setIsFormulaCalculationEnabled(
    true,
    function() {
        console.log("set is formula calculation enabled completed.");
    },
    onTxError
);