TableColumnCollection Object
Description
Contains all columns of a table in a Text Control document
Syntax
TableColumnCollectionExamples
The following example demonstrates TableColumnCollection in a practical document-editing workflow. It contains all columns of a table in a Text Control document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectTableColumnCollection(tableColumns) {
tableColumns.getCanAdd(
function(result) {
if (result) {
console.log("get can add is available.");
} else {
console.warn("get can add is not available in the current document state.");
}
},
onTxError
);
}Members
Methods
| Method | Description |
|---|---|
| add | Adds a new table column at the current text input position. |
| elementAt | Returns the element at a specified index in the collection. (Inherited from Collection.) |
| forEach | Executes a callback function for each element. (Inherited from Collection.) |
| getCanAdd | Gets a value indicating whether a new column can be inserted at the current input position. |
| getCanRemove | Gets a value indicating whether the selected columns can be removed. Columns can be removed, if either the current text input position is in a column, or if a part of a table is selected. |
| getCount | Gets the number of elements contained in the collection. (Inherited from Collection.) |
| getItem | Gets the table column with the specified index or the column at the current input position. |
| remove | Removes the table column at the current text input position or all selected columns when a text selection exists. |