[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.SortFieldBase.Key

Key Property

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.

Declaration
public IRange Key { get; }
Public ReadOnly Property Key As IRange
Implements
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Name", "Score"},
    {"Tom", 80},
    {"Ada", 95},
    {"Ken", 88}
};
ISortField sortField = new ValueSortField(worksheet.Range["B2:B4"], SortOrder.Ascending);
IRange key = sortField.Key;