Skip to main content

TcxCustomGridTableView.SortedItems Property

Provides indexed access to all sorted data items.

Declaration

property SortedItems[Index: Integer]: TcxCustomGridTableItem read;

Property Value

Type Description
TcxCustomGridTableItem

A data item whose SortOrder property is set to soAscending or soDescending.

The returned data item’s SortIndex property value matches the index passed as the Index parameter.

You need to cast the returned object to the corresponding terminal TcxCustomGridTableItem class descendant to access all public API members.

Tip

You can call the returned object’s ClassType function to identify the data item type.

Remarks

The grid View allows you to sort data against one or multiple data items in any order. The SortedItems property provides indexed access to all data items involved in complex sort operations applied to grid data. To identify the number of data items accessible through the SortedItems property, use the SortedItemCount property.

To include a data item in the active sort operation, set the data item’s SortOrder property to soAscending or soDescending. The SortedItemCount property value increases by one as a result, and the data item’s order in the sort operation and the SortedItems collection depends on the SortIndex property value.

If a data item’s SortOrder property value changes to soNone, the data item leaves the SortedItems collection, and the SortedItemCount property value decreases by one.

See Also