This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IT > ITableSort Interface (ArcObjects .NET 10.4 SDK) |
Provides access to members that return and modify information to sort a table.
The ITableSort interface is used to sort data from a table, cursor, or selection set, and returns the sorted rows as a cursor or an ID enumerator.
Description | ||
---|---|---|
Ascending | Field sort order. | |
CaseSensitive | Character fields case sensitive. Default: False. | |
Compare | Compare call back interface. Specify Null (default) for normal behavior. | |
Cursor | The cursor of the data to sort on. Ensure that sorting fields are available. Cancels SelectionSet. | |
Fields | Comma list of field names to sort on. | |
IDByIndex | A id by its index value. | |
IDs | List of sorted IDs. | |
QueryFilter | The query filter on table or selection set. | |
Rows | Cursor of sorted rows. | |
SelectionSet | The selection set as a source of the data to sort on. Cancels Cursor. | |
Sort | Sort rows. | |
SortCharacters | Number of characters to sort on, for string fields. A null (default) sorts on the whole string. | |
Table | The table as a source of the data to sort on. |
CoClasses and Classes | Description |
---|---|
TableSort | Esri Table Sort object. |
The Fields property is required. It is a comma-delimited list of the fields to be sorted. When the sort method is called, the first field is sorted, then the second field, and so on. The Table property specifies the table or object class on which the sort is to be performed. Alternatively, the Cursor property may be used to indicate the data to be sorted. If you use the Cursor property, you must also set the Table property to the table referenced by the cursor.
If the SelectionSet property is set, the Table property is set automatically, and the Cursor property remains optional.
The Ascending, CaseSensitive, Compare, QueryFilter, SelectionSet, and SortCharacters properties may also be used to further define how the data is to be sorted.
Once the desired sorting properties have been set, the sort method must be called to order the rows. Either the Rows property or the IDs property can then be used to access the data in sorted order.
A custom class that implements ITableSortCallBack can be used to apply a user defined sorting algorithm instead of the default. The Compare property gives the TableSort object access to an instance of a custom class.
ICursor Interface | ITable Interface | IQueryFilter Interface