New to Telerik Document ProcessingStart a free 30-day trial

Sort condition that orders cells by their background fill color, grouping matching fills together.

Definition

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

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public sealed class FillColorSortCondition : OrderedSortConditionBase<IFill>, ISortCondition

Inheritance: objectSortConditionBase<IFill>OrderedSortConditionBase<IFill>FillColorSortCondition

Implements: ISortCondition

Inherited Members OrderedSortConditionBase<IFill>.SortOrderSortConditionBase<IFill>.RelativeIndex

Constructors

Initializes a new instance of the FillColorSortCondition class with a target fill color for sorting.

C#
public FillColorSortCondition(int relativeIndex, IFill fill, SortOrder sortOrder)
Parameters:relativeIndexint

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

fillIFill

The fill.

sortOrderSortOrder

The sort order.

Methods

Determines whether the specified object is a FillColorSortCondition with the same fill color and settings.

C#
public override bool Equals(object obj)
Parameters:objobject

The obj.

Returns:

bool

Overrides: OrderedSortConditionBase<IFill>.Equals(object)

Computes a hash code combining the fill color and base sort condition hash.

C#
public override int GetHashCode()
Returns:

int

Overrides: OrderedSortConditionBase<IFill>.GetHashCode()

Extracts the fill color from the specified cell, resolving theme colors to local RGB values.

C#
public override 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.

Overrides: SortConditionBase<IFill>.GetValue(Cells, int, int)

Properties

Gets the comparer that prioritizes cells matching the target fill color.

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

The comparer used for sorting.

Overrides: SortConditionBase<IFill>.Comparer

Gets the target fill color used to identify matching cells for priority sorting.

C#
public IFill Fill { get; }
Property Value:

The fill.

Gets the cell fill property definition used for color comparison.

C#
protected override IPropertyDefinition<IFill> PropertyDefinition { get; }
Property Value:

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

Overrides: SortConditionBase<IFill>.PropertyDefinition