SortingSortDataRows(DataTable, DataColumn, Boolean, Boolean) Method |
Sorts the data rows of a table (more accurate: of all columns belonging to a column group, see below), using the data of column col to determine the order.
Namespace: Altaxo.DataAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntaxpublic static void SortDataRows(
this DataTable table,
DataColumn col,
bool inAscendingOrder,
bool treatEmptyElementsAsLowest
)
Parameters
- table DataTable
- The table where the data columns should be sorted.
- col DataColumn
- The column which is used for determining the order of the entries.
This column has to belong to the table (otherwise an exception will be thrown). All columns with the same group number than this column will be sorted.
- inAscendingOrder Boolean
- If true, the table is sorted in ascending order. Otherwise, the table is sorted in descending order.
- treatEmptyElementsAsLowest Boolean
- If true, empty elements are treated as lower as any other non-empty element. If false, empty elements are treated as higher as any non-empty element.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also