SortingSortDataColumnsByPropertyColumn(DataTable, IAscendingIntegerCollection, DataColumn, Boolean) Method |
Sort the order of the data columns (not rows!) of a table based on a specified property column. The relationship of property data to data columns is maintained.
Namespace: Altaxo.DataAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static void SortDataColumnsByPropertyColumn(
this DataTable table,
IAscendingIntegerCollection selectedDataCols,
DataColumn propCol,
bool inAscendingOrder
)
Parameters
- table DataTable
- The table where to sort the columns.
- selectedDataCols IAscendingIntegerCollection
- Data columns to sort.
- propCol DataColumn
- The property column where the sorting order is based on.
- inAscendingOrder Boolean
- If true, the sorting is in ascending order. If false, the sorting is in descending order.
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