Javascript: TableColumnCollection.getItem Method
Description
Gets the table column with the specified index or the column at the current input position.
Syntax
<void> TableColumnCollection.getItem(<RequestTableColumnCallback> callback, [<ErrorCallback> errorCallback], [<number> column])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the table column at the given index. |
| errorCallback | Optional. Is called when the operation failed with an error. |
| column | Optional. Specifies the column number. It must be between 1 and the value returned through the collection's Count property. |
Examples
The following example demonstrates TableColumnCollection.getItem in a practical document-editing workflow. It gets the table column with the specified index or the column at the current input position.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectItem(tableColumns) {
tableColumns.getItem(
function(column) {
if (!column) {
console.warn("No table column was returned.");
return;
}
console.log("get item result:", column);
},
onTxError,
3
);
}