LinqDataSource.OrderGroupsByParameters 屬性

定義

取得用來建立 Order Groups By 子句的參數集合。Gets the collection of parameters that are used to create the Order Groups By clause.

public:
 property System::Web::UI::WebControls::ParameterCollection ^ OrderGroupsByParameters { System::Web::UI::WebControls::ParameterCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.ParameterCollection OrderGroupsByParameters { get; }
[<System.ComponentModel.Browsable(false)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.OrderGroupsByParameters : System.Web.UI.WebControls.ParameterCollection
Public ReadOnly Property OrderGroupsByParameters As ParameterCollection

屬性值

ParameterCollection

用來建立 Order Groups By 子句的參數。The parameters that are used to create the Order Groups By clause.

屬性

備註

LinqDataSource控制項使用集合中的參數 OrderGroupsByParameters ,在執行時間建立 Order Groups by 子句。The LinqDataSource control uses parameters in the OrderGroupsByParameters collection to create the Order Groups By clause at run time.

OrderGroupsByParameters只有當您必須在執行時間于 Order Group by 子句中設定值時,才將值加入至集合。You add values to the OrderGroupsByParameters collection only when you must set values at run time in the Order Groups By clause. 您可以使用屬性來定義用來排序資料的欄位 OrderGroupsByYou can define the fields that are used to order the data by using the OrderGroupsBy property.

您可以設定集合中的參數 OrderGroupsByParameters ,並將參數與屬性中的預留位置比對 OrderGroupsByYou can set parameters in the OrderGroupsByParameters collection and match the parameters to placeholders in the OrderGroupsBy property. 不過,當您使用這個方法時,集合中的參數 OrderGroupsByParameters 無法代表資料行名稱,而必須代表值。However, when you use this approach, the parameters in the OrderGroupsByParameters collection cannot represent a column name; they must represent values. 您可以將參數設定為值,然後將該值與屬性進行比較。You can set a parameter to a value and then compare that value to a property. 例如,您可以根據屬性中的值是否小於參數所代表的運行時間值來排序資料。For example, you can order the data based on whether the values in a property are less than the run-time value represented by the parameter.

適用於