[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISortFields.Item

this Property

this[int]

Gets the sort field at the specified index in the sort field list.

Use this indexer to retrieve a sort field that has been added to the current ISortFields collection.

Declaration
ISortField this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISortField
Parameters
Type Name Description
int index

The index of the sort field to retrieve.

Property Value
Type Description
ISortField

The sort field at the specified index.

Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Score", "Name"},
    {2, "B"},
    {1, "C"},
    {1, "A"}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B4"], true);
ISortFields sortFields = table.Sort.SortFields;
sortFields.Add(new ValueSortField(worksheet.Range["A2:A4"], SortOrder.Ascending));
ISortField sortField = sortFields[0];