[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.SortFieldBase

SortFieldBase Class

Represents the abstract base class for sort fields.

This class provides the common implementation of ISortField for worksheet sorting. It encapsulates the shared sort metadata used by concrete sort field types, including the key range, the sort priority in a multi-key sort, and the criterion specified by SortOn.

Use one of its concrete subclasses when defining sort behavior for values, cell fill colors, font colors, or icons. Instances of this type are typically managed as part of a sort definition rather than instantiated directly.

Implements
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public abstract class SortFieldBase : ISortField
Public MustInherit Class SortFieldBase
    Implements ISortField
Examples
worksheet.Range["A1:A3"].Value = new object[,] {
    {3}, {1}, {2}
};
SortFieldBase sortField = new ValueSortField(worksheet.Range["A1:A3"], SortOrder.Ascending);
SortOnType sortOn = sortField.SortOn;

Constructors

Name Description
SortFieldBase()

Properties

Name Description
Key

Gets the range used as the sort key.

Returns the IRange assigned to this sort field. This range identifies the cells used to evaluate the sort order for the field.

Priority

Gets or sets the priority of this sort field for multi-field sorting.

SortOn

Gets the criterion used by this sort field.

The returned value depends on the concrete sort-field type. A ValueSortField returns Values, a CellColorSortField returns CellColor, a FontColorSortField returns FontColor, and an IconSortField returns CellIcon.