Method ThenBy
| Improve this Doc View SourceThenBy(IComparer<DataRow>, IComparer<DataRow>)
Adds sorting comparer to exiting DataRow comparer.
Declaration
public static IComparer<DataRow> ThenBy(this IComparer<DataRow> orderBy, IComparer<DataRow> thenBy)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IComparer<DataRow> | orderBy | The existing DataRow comparer. |
System.Collections.Generic.IComparer<DataRow> | thenBy | The sorting comparer to add. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IComparer<DataRow> | The result DataRow comparer. |
ThenBy(IDataRowComparer, IDataRowComparer)
Adds sorting comparer to exiting DataRow comparer.
Declaration
public static IDataRowComparer ThenBy(this IDataRowComparer orderBy, IDataRowComparer thenBy)
Parameters
Type | Name | Description |
---|---|---|
IDataRowComparer | orderBy | The existing DataRow comparer. |
IDataRowComparer | thenBy | The sorting comparer to add. |
Returns
Type | Description |
---|---|
IDataRowComparer | The result DataRow comparer. |
ThenBy(IDataRowComparer, Column, SortDirection)
Adds additional sorting column to existing DataRow comparer.
Declaration
public static IDataRowComparer ThenBy(this IDataRowComparer orderBy, Column column, SortDirection direction = SortDirection.Ascending)
Parameters
Type | Name | Description |
---|---|---|
IDataRowComparer | orderBy | The existing DataRow comparer. |
Column | column | The additional sorting column. |
SortDirection | direction | The sorting direction. |
Returns
Type | Description |
---|---|
IDataRowComparer | The result DataRow comparer. |
ThenBy<T>(IDataRowComparer, Column<T>, SortDirection, IComparer<T>)
Adds additional sorting column to existing DataRow comparer.
Declaration
public static IDataRowComparer ThenBy<T>(this IDataRowComparer orderBy, Column<T> column, SortDirection direction = SortDirection.Ascending, IComparer<T> comparer = null)
Parameters
Type | Name | Description |
---|---|---|
IDataRowComparer | orderBy | The existing DataRow comparer. |
Column<T> | column | The additional sorting column. |
SortDirection | direction | The sorting direction. |
System.Collections.Generic.IComparer<T> | comparer | Data value comparer. |
Returns
Type | Description |
---|---|
IDataRowComparer | The result DataRow comparer. |
Type Parameters
Name | Description |
---|---|
T | Data type of column. |