Edytuj

Udostępnij za pośrednictwem


OrderByExpression.ThenByExpressions Property

Definition

Gets or sets the collection of ThenBy expressions to apply after an OrderByExpression value is applied to the data source.

public:
 property System::Collections::ObjectModel::Collection<System::Web::UI::WebControls::Expressions::ThenBy ^> ^ ThenByExpressions { System::Collections::ObjectModel::Collection<System::Web::UI::WebControls::Expressions::ThenBy ^> ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)]
public System.Collections.ObjectModel.Collection<System.Web.UI.WebControls.Expressions.ThenBy> ThenByExpressions { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)>]
member this.ThenByExpressions : System.Collections.ObjectModel.Collection<System.Web.UI.WebControls.Expressions.ThenBy>
Public ReadOnly Property ThenByExpressions As Collection(Of ThenBy)

Property Value

The collection of ThenBy expressions to apply after the OrderByExpression is applied to the data source.

Attributes

Examples

The following example shows how to sort data by the ListPrice field in descending order and then by the product ID field in ascending order using the ThenByExpressions. This code example is part of a larger example that is 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 in the QueryExtender control, subsequent sort operations can be performed by using the ThenByExpressions property.

Applies to