Share via


OrderByExpression.ThenByExpressions 属性

定义

获取或设置要在将 ThenBy 值应用于数据源之后应用的 OrderByExpression 表达式的集合。

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)

属性值

要在将 ThenBy 应用于数据源之后应用的 OrderByExpression 表达式的集合。

属性

示例

以下示例演示如何使用 按 ListPrice 字段降序对数据进行排序,然后按产品 ID 字段按升序对数据进行 ThenByExpressions排序。 此代码示例是 演练:使用声明性语法筛选网页中的数据中提供的更大示例的一部分。

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

注解

使用 OrderByExpression 控件中的 QueryExtender 执行排序操作后,可以使用 属性执行 ThenByExpressions 后续排序操作。

适用于