Redigera

Dela via


ThenBy Class

Definition

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
Inheritance
ThenBy

Examples

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"   
    Direction="Descending">  
  <asp:ThenBy DataField="ProductID" Direction="Ascending"/>  
</asp:OrderByExpression>  

Remarks

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.

Constructors

ThenBy()

Initializes a new instance of the ThenBy class.

Properties

DataField

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

Direction

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

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also