ITableSort Interface

Provides access to members that return and modify information to sort a table.

Description

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.

Members

Name Description
Write-only property Ascending Field sort order.
Write-only property CaseSensitive Character fields case sensitive. Default: False.
Write-only property Compare Compare call back interface. Specify Null (default) for normal behavior.
Write-only property Cursor The cursor of the data to sort on. Ensure that sorting fields are available. Cancels SelectionSet.
Write-only property Fields Comma list of field names to sort on.
Read-only property IDByIndex A id by its index value.
Read-only property IDs List of sorted IDs.
Read/write property QueryFilter The query filter on table or selection set.
Read-only property Rows Cursor of sorted rows.
Write-only property SelectionSet The selection set as a source of the data to sort on. Cancels Cursor.
Read-only property SelectionSet The selection set as a source of the data to sort on. Cancels Cursor.
Method Sort Sort rows.
Write-only property SortCharacters Number of characters to sort on, for string fields. A null (default) sorts on the whole string.
Write-only property Table The table as a source of the data to sort on.
Read-only property Table The table as a source of the data to sort on.

ITableSort.Ascending Property

Field sort order.

Public Sub set_Ascending ( _
    ByVal Field As String, _
    ByVal A_2 As Boolean _
)
public void set_Ascending (
    string Field,
    bool A_2
);

ITableSort.CaseSensitive Property

Character fields case sensitive. Default: False.

Public Sub set_CaseSensitive ( _
    ByVal Field As String, _
    ByVal A_2 As Boolean _
)
public void set_CaseSensitive (
    string Field,
    bool A_2
);

ITableSort.Compare Property

Compare call back interface. Specify Null (default) for normal behavior.

Public WriteOnly Property Compare
public void Compare {set;}

ITableSort.Cursor Property

The cursor of the data to sort on. Ensure that sorting fields are available. Cancels SelectionSet.

Public WriteOnly Property Cursor
public void Cursor {set;}

ITableSort.Fields Property

Comma list of field names to sort on.

Public WriteOnly Property Fields
public void Fields {set;}

ITableSort.IDByIndex Property

A id by its index value.

Public Function get_IDByIndex ( _
    ByVal Index As Integer _
) As Integer
public int get_IDByIndex (
    int Index
);

ITableSort.IDs Property

List of sorted IDs.

Public ReadOnly Property IDs As IEnumIDs
public IEnumIDs IDs {get;}

ITableSort.QueryFilter Property

The query filter on table or selection set.

Public Property QueryFilter As IQueryFilter
public IQueryFilter QueryFilter {get; set;}

ITableSort.Rows Property

Cursor of sorted rows.

Public ReadOnly Property Rows As ICursor
public ICursor Rows {get;}

ITableSort.SelectionSet Property

The selection set as a source of the data to sort on. Cancels Cursor.

Public Property SelectionSet As ISelectionSet
public ISelectionSet SelectionSet {get; set;}

ITableSort.SelectionSet Property

The selection set as a source of the data to sort on. Cancels Cursor.

Public Property SelectionSet As ISelectionSet
public ISelectionSet SelectionSet {get; set;}

ITableSort.Sort Method

Sort rows.

Public Sub Sort ( _
    ByVal TrackCancel As ITrackCancel _
)
public void Sort (
    ITrackCancel TrackCancel
);

ITableSort.SortCharacters Property

Number of characters to sort on, for string fields. A null (default) sorts on the whole string.

Public Sub set_SortCharacters ( _
    ByVal Field As String, _
    ByVal A_2 As Integer _
)
public void set_SortCharacters (
    string Field,
    int A_2
);

ITableSort.Table Property

The table as a source of the data to sort on.

Public Property Table As ITable
public ITable Table {get; set;}

ITableSort.Table Property

The table as a source of the data to sort on.

Public Property Table As ITable
public ITable Table {get; set;}

Classes that implement ITableSort

Classes Description
TableSort Esri Table Sort object.

Remarks

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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.