SortingSortDataColumnsByPropertyColumns Method |
Sort the order of the data columns (not rows!) of a table based on multiple specified property columns. The relationship of property data to data columns is maintained.
Namespace: Altaxo.DataAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntaxpublic static void SortDataColumnsByPropertyColumns(
this DataTable table,
IReadOnlyList<(DataColumn column, bool inAscendingOrder)> cols,
bool sortColumnsOnlyFromPropertyGroup,
bool treatEmptyElementsAsLowest
)
Parameters
- table DataTable
- The table containing the property columns used as sort criteria.
- cols IReadOnlyListValueTupleDataColumn, Boolean
- List of tuples of property columns and the correpsonding sort direction. The first element has highest priority.
- sortColumnsOnlyFromPropertyGroup Boolean
- If true, only those data columns are moved in position, that have the same group number as the property column that are used as sort criterion.
- treatEmptyElementsAsLowest Boolean
- If true, empty elements (e.g, NaN) are treated as lower as any other non-empty element. If false, empty elements are treated as higher as any other 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