SortState.Sort(Int32, Color, Boolean) Method
Sorts the specified column in the given order by the selected font color.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
columnIndex | Int32 | A zero-based index index of the column to sort. |
fontColor | Color | the font color. |
descendingOrder | Boolean |
|
Remarks
Example
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 ascending order by font color in column "D".
Color color = worksheet["D12"].Font.Color;
worksheet.AutoFilter.SortState.Sort(2, color, false);
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Sort(Int32, Color, Boolean) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.