This document is archived and information here might be outdated.  Recommended version.


ITableSortCallBack Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IT > ITableSortCallBack Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabase)  

ITableSortCallBack Interface

Provides access to members that compare field values for a table sort operation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Name Description
Method Compare Compare fields. Return result as 0=match, -1=field1 < field2, 1=field1 > field2, 2=force caller to calculate.

CoClasses that implement ITableSortCallBack

CoClasses and Classes Description

Remarks

The ITableSortCallBack mechanism allows you to perform custom sorting operations. The compare method in ITableSortCallback is called each time two values need to be compared. From these two values, you need to evaluate which is the greater or lesser, or if the two values are equal. The default implementation is to compare the entire values. With the ITableSortCallBack interface you can compare parts of the two values. For example, if you want to sort on an address field which includes street numbers and names, you can parse the two values to omit the street number and then compare the remaining values, the street names.

When the compare method is called, the table field index and the sort field index are returned. The sort index refers to the current field number that you are comparing in the field list you specified to sort on.

See Also

ITableSort Interface | ITable Interface

.NET Samples

Multivariate renderer (Code Files: MultivariateRenderer)