TX Sheet Control

DataConnections Class

Class

Optional connection manager. Private state is inaccessible at runtime; no global namespace is installed. One provider per logical connection, multiple bindings per query. Re-registering cancels obsolete refreshes. Loading cancels requests and clears bindings; register bindings again for the new document. Dispose on host teardown.

Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

ES module import: import { DataConnections } from '@txtextcontrol/tx-sheet-control';.

Constructor

new DataConnections(workbook)
ParameterTypeOptionalDescription
workbookDataWorkbookNoValue matching workbook's declared type and the owning object's validation rules.

Returns: DataConnections.

Members

Methods

MethodDescription
bindInstalls a detached binding. It does not fetch until refresh is called.
disposeStops polling and cancels all queries. This instance cannot be reused.
onChangeSubscribes to lifecycle notifications; returns an unsubscribe function.
refreshFetches and validates a complete snapshot before writing. Latest refresh wins; failures preserve old data. Errors are returned to the host, which controls user-visible diagnostics. A timeout rejects with AbortError.
refreshAllRefreshes all bindings independently; one rejected source does not prevent the others from updating.
registerRegisters a transport; replacing it cancels requests using the previous transport.
startStarts nonoverlapping polling, default 30 seconds, with at least one second between completed rounds.
stopStops polling; manual refreshes remain available. In-flight requests can complete.
unbindRemoves a runtime binding and cancels its request. Existing workbook data remains.

Examples

Pass the DataConnections value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

function inspectDataConnections(dataConnections) {
    const value = dataConnections;
    console.log('DataConnections.value', value);
}

See Also