Class
CustomValuesSortCondition

Sort condition that orders cell values according to a custom list sequence, placing matching items first.

Definition

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

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public sealed class CustomValuesSortCondition : OrderedSortConditionBase<ICellValue>, ISortCondition

Inheritance: objectSortConditionBase<ICellValue>OrderedSortConditionBase<ICellValue>CustomValuesSortCondition

Implements: ISortCondition

Inherited Members OrderedSortConditionBase<ICellValue>.SortOrderSortConditionBase<ICellValue>.GetValue(Cells, int, int)SortConditionBase<ICellValue>.RelativeIndex

Constructors

CustomValuesSortCondition(int, string[], SortOrder)

Initializes a new instance of the CustomValuesSortCondition class with a custom list defining the sort order.

Declaration

cs-api-definition
public CustomValuesSortCondition(int relativeIndex, string[] customList, SortOrder sortOrder)

Parameters

relativeIndex

int

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

customList

string[]

The custom list.

sortOrder

SortOrder

The sort order.

Properties

Comparer

Gets the comparer that ranks values by their position in the custom list.

Declaration

cs-api-definition
public override IComparer<SortValue> Comparer { get; }

Property Value

IComparer<SortValue>

The comparer used for sorting.

Overrides SortConditionBase<ICellValue>.Comparer

CustomList

Gets the ordered array of strings defining the custom sort sequence.

Declaration

cs-api-definition
public string[] CustomList { get; }

Property Value

string[]

The custom list.

PropertyDefinition

Gets the cell value property definition used for custom list comparison.

Declaration

cs-api-definition
protected override IPropertyDefinition<ICellValue> PropertyDefinition { get; }

Property Value

IPropertyDefinition<ICellValue>

The property definition of the property which is used for sorting.

Overrides SortConditionBase<ICellValue>.PropertyDefinition

Methods

Equals(object)

Determines whether the specified object is a CustomValuesSortCondition with the same custom list and settings.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Overrides OrderedSortConditionBase<ICellValue>.Equals(object)

GetHashCode()

Computes a hash code combining the base sort condition hash and the custom list content.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides OrderedSortConditionBase<ICellValue>.GetHashCode()