[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IIconSortField

IIconSortField Interface

Represents the sort field by icon.

An IIconSortField defines an icon-based sort key for a range and extends ISortField. Use this interface to specify both the IIcon to sort by and the SortOrder applied to that icon criterion.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IIconSortField : ISortField
Public Interface IIconSortField
    Inherits ISortField
Examples
worksheet.Range["A1:A4"].Value = new object[,] {{3}, {1}, {4}, {2}};
IRange keyRange = worksheet.Range["A1:A4"];
IIconSetCondition condition = keyRange.FormatConditions.AddIconSetCondition();
condition.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];
IIcon icon = workbook.IconSets[IconSetType.Icon3TrafficLights1][0];
IIconSortField sortField = new IconSortField(keyRange, icon, SortOrder.Descending);
ISort sort = worksheet.Sort;
sort.SortFields.Add(sortField);
sort.Range = keyRange;
sort.Apply();

Properties

Name Description
Icon

Gets the IIcon object used to sort by.

Use this property to retrieve the IIcon associated with the current icon sort field.

Order

Gets the sort order.