New to Telerik Document ProcessingStart a free 30-day trial

Defines a condition for sorting rows or columns in a worksheet range, specifying which cell property to compare and how to order the results.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Sorting

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public interface ISortCondition

Derived Classes: CustomValuesSortConditionFillColorSortConditionForeColorSortConditionOrderedSortConditionBase<T>SortConditionBase<T>ValuesSortCondition...

Methods

Extracts the sort-relevant value from the specified cell for comparison during sorting.

C#
object GetValue(Cells cells, int rowIndex, int columnIndex)
Parameters:cellsCells

The cells.

rowIndexint

The row index.

columnIndexint

The column index.

Returns:

object

The value of the specified cell.

Properties

Gets the comparer that defines the ordering logic for this sort condition.

C#
IComparer<SortValue> Comparer { get; }
Property Value:

The comparer used for sorting.

Gets the zero-based offset within the sort range that identifies the row or column containing values to compare.

C#
int RelativeIndex { get; }
Property Value:

The index of the row or column that is key for sorting relative to the sorted range.