Click or drag to resize

SortingSortRows(DataColumnCollection, IReadOnlyListValueTupleDataColumn, Boolean, Boolean) Method

Sorts the data rows of a table (more accurate: of all columns belonging to a column group, see below), using multiple specified column.

Namespace: Altaxo.Data
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static void SortRows(
	this DataColumnCollection table,
	IReadOnlyList<(DataColumn column, bool inAscendingOrder)> cols,
	bool treatEmptyElementsAsLowest
)

Parameters

table  DataColumnCollection
The table where the data columns should be sorted.
cols  IReadOnlyListValueTupleDataColumn, Boolean
The columns which are used for determining the order of the entries. The sorting will be done by cols[0], then cols[1] and so on. All this columns has to belong to the table and need to have the same column group number (otherwise an exception will be thrown). All columns with the same group number than this columns will be included in the sort process.
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 DataColumnCollection. 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