言語

ThenBy.DataField プロパティ

定義

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 フィールドを昇順で並べ替える方法を示します。 このコード例は、「 チュートリアル: 宣言型構文を使用した Web ページ内のデータのフィルター処理」で提供されるより大きな例の一部です。

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

注釈

OrderByExpressionは、指定したデータ フィールドのデータを並べ替えます。 後続の並べ替え操作は、OrderByExpression コレクションThenByExpressionsを使用して、別のデータ フィールドに対して実行できます。 このプロパティは、 ThenBy 並べ替え操作を適用するデータ フィールドを指定します。

適用対象