DataConnections.register Method
Registers a transport; replacing it cancels requests using the previous transport.
Owner: DataConnections. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.
Syntax
register(connectionId: string, provider: DataProvider): void
Parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
connectionId | string | No | Value matching connectionId's declared type and the owning object's validation rules. |
provider | DataProvider | No | Value matching provider's declared type and the owning object's validation rules. |
Return Value
void.
Examples
Pass an existing DataConnections from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.
import type { DataConnections } from '@txtextcontrol/tx-sheet-control';
function applyDataConnectionsRegister(dataConnections: DataConnections) {
dataConnections['register']('sales-service', (request, signal) =>
Promise.resolve({
columns: ['Region', 'Revenue'],
rows: [
['North', 42000],
['South', 38500],
],
}),
);
}
Remarks
Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.