[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISortFields.Remove

Remove Method

Remove(ISortField)

Removes a sort field.

Declaration
bool Remove(ISortField sortField)
Function Remove(sortField As ISortField) As Boolean
Parameters
Type Name Description
ISortField sortField

The sort field to remove.

Returns
Type Description
bool

true if the specified sort field is removed; otherwise, false.

Examples
worksheet.Range["A1:A4"].Value = new object[,] {{5}, {3}, {4}, {2}};
ISort sort = worksheet.Sort;
sort.Range = worksheet.Range["A1:A4"];
ISortField sortField = new ValueSortField(worksheet.Range["A1:A4"]);
sort.SortFields.Add(sortField);
bool removed = sort.SortFields.Remove(sortField);