ThenBy.DataField 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定物件的屬性 IQueryable ,將該表達式套用 ThenBy 到。
public:
property System::String ^ DataField { System::String ^ get(); void set(System::String ^ value); };
public string DataField { get; set; }
member this.DataField : string with get, set
Public Property DataField As String
屬性值
就是要套用該IQueryable表達式的物件的ThenBy性質。
範例
以下範例展示了如何依照 ListPrice 欄位(降序)排序資料,再依 Product ID 欄位(由序遞減)排序。 此程式碼範例是《 Walkthrough:使用宣告式語法過濾網頁資料》中提供較大範例的一部分。
<asp:OrderByExpression DataField="ListPrice"
Direction="Descending">
<asp:ThenBy DataField="ProductID" Direction="Ascending"/>
</asp:OrderByExpression>
備註
它 OrderByExpression 會在指定的資料欄位上排序資料。 後續的排序操作可透過集合OrderByExpressionThenByExpressions對不同資料欄位執行。 此特性指定了要應用 ThenBy 排序操作的資料欄位。