[]
TableSheet provides column-based sorting and filtering at the View level.
Both behaviors are defined by View options and column configuration, and are executed through the column header filter button.

Each column has three possible states:
Ascending
Descending
None

By default, TableSheet supports multi-column sorting.
When multiple columns are sorted, the View maintains an ordered list of sort descriptors. Sorting is applied sequentially based on that order. Each subsequent sort operates within the result set produced by the previous sort.

Clearing all sorting restores the original data order.
Multi-column Mode
Controlled by ITableSheetOptions.allowSorts:
interface GC.Spread.Sheets.TableSheet.ITableSheetOptions {
allowSorts?: boolean; // Default: true
}true — multiple active sorts allowed.
false — only one active sort is retained.
If multiple sorts exist, only the first remains.
Automatic Re-sorting
Controlled by the View property:
view.autoSort = false;Default: true
When enabled, editing values in sorted columns triggers re-sorting.
When disabled, edits do not reapply sorting.
Applying Sorts
From the column menu:
Primary action — applies sorting to the column and clears other sorts.
Add/Remove action (multi-column mode only):
+ adds the column to the active sort list.
– removes it.
The order in which columns are added determines sort priority.
When a sort is removed, remaining sort descriptors are reordered and data is re-evaluated accordingly.

Sorted columns display:
Direction (ascending or descending)
Sequence number (visible only when multiple sorts are active)

Indicators are hidden when no sorting is applied.

Hierarchical Data
Sorting applies only to sibling nodes.
The hierarchy structure is preserved.

Grouped Data
Grouped columns and their source columns share the same sorting state.
In multi-column mode, each group level may contain multiple sorts.
Sorting priority:
Higher group levels
Lower group levels
Regular columns
Sorting on grouping-related columns may be reset if grouping structure changes.

Cross Columns
Sorting can be applied to cross columns.
It may be lost if the data changes or the View columns are rebuilt.

Filtering is column-based and supports multiple active filters simultaneously.
Filter Types
Filter by Value — condition-based filtering (text, number, date).
Filter by List — selection from distinct column values.

Column-level visibility of filter options is controlled by:
allowFilterByValue
allowFilterByList
Automatic Re-filtering
Controlled by:
view.autoFilter = true;Default: false
When enabled, newly added or modified values are filtered out only if they match values already excluded by the active filter.
Otherwise, new values remain visible.
Sorting and filtering UI behavior can be configured per column:
allowSort
allowFilterByValue
allowFilterByList
var view = customerTable.addView("myView", [
{ value: "customerKey", allowSort: false, allowFilterByValue: false, allowFilterByList: false },
{ value: "customer", allowSort: false },
{ value: "billToCustomer", allowFilterByValue: false },
{ value: "category", allowFilterByList: false }
]);
sheet.setDataView(view);