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 欄位以遞減順序排序資料,然後使用 以遞增順序 ThenByExpressions 排序產品識別碼欄位。 此程式碼範例是逐步解說 :使用宣告式語法在網頁中篩選資料中提供之較大範例的一部分。

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

備註

使用 控制項中的 QueryExtender 執行 OrderByExpression 排序作業之後,就可以使用 ThenByExpressions 屬性來執行後續的排序作業。

適用於