SortState.Sort(Int32, Fill, Boolean) Method
Sorts the specified column in the given order by the selected fill pattern.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
columnIndex | Int32 | A zero-based index index of the column to sort. |
fill | Fill | An object that contains fill pattern parameters. |
descendingOrder | Boolean |
|
Remarks
Example
using DevExpress.Spreadsheet;
using (var workbook = new Workbook()) {
workbook.LoadDocument("Document.xlsx");
Worksheet worksheet = workbook.Worksheets["Regional sales"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// Enable filtering for the "B2:E23" cell range.
CellRange range = worksheet["B2:E23"];
worksheet.AutoFilter.Apply(range);
// Sort data in the "B2:E23" range
// in descending order by column "C".
Fill color = worksheet["C10"].Fill;
worksheet.AutoFilter.SortState.Sort(1, color, false);
}
See Also