ThenBy ThenBy ThenBy ThenBy Class


Provides a way to apply a sort expression to an IQueryable data source object after an OrderByExpression expression is applied.

public ref class ThenBy
public class ThenBy
type ThenBy = class
Public Class ThenBy


The following example shows how to sort data by the ListPrice field in descending order and then on the ProductID field in ascending order using the ThenBy type. This code example is part of a larger example provided in Walkthrough: Filtering Data in a Web Page Using Declarative Syntax.

<asp:OrderByExpression DataField="ListPrice"   
  <asp:ThenBy DataField="ProductID" Direction="Ascending"/>  


After a sort operation is performed by using the OrderByExpression expression in the QueryExtender control, subsequent sort operations can be performed by using the ThenBy class on a different data field.


ThenBy() ThenBy() ThenBy() ThenBy()

Initializes a new instance of the ThenBy class.


DataField DataField DataField DataField

Gets or sets the property of the IQueryable object to apply the ThenBy expression to.

Direction Direction Direction Direction

Gets or sets the ordering direction of the IQueryable data source object.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also