Interface ITableSortCallBack

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

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

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("341943F3-9450-11D2-A087-0000F8775BF9")]
public interface ITableSortCallBack

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.

Methods

Compare(object, object, int, int)

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

int Compare(object value1, object value2, int FieldIndex, int fieldSortIndex)

Parameters

value1 object
value2 object
FieldIndex int
fieldSortIndex int

Returns

int