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
属性值
用于创建订单组 By 子句的参数。The parameters that are used to create the Order Groups By clause.
- 属性
注解
LinqDataSource控件在运行时使用集合中的参数 OrderGroupsByParameters 来创建订单组 by 子句。The LinqDataSource control uses parameters in the OrderGroupsByParameters collection to create the Order Groups By clause at run time.
OrderGroupsByParameters仅当必须在顺序组 by 子句中设置运行时值时,才向集合添加值。You add values to the OrderGroupsByParameters collection only when you must set values at run time in the Order Groups By clause. 您可以使用属性定义用于对数据进行排序的字段 OrderGroupsBy 。You can define the fields that are used to order the data by using the OrderGroupsBy property.
可以在集合中设置参数 OrderGroupsByParameters ,并将参数与属性中的占位符匹配 OrderGroupsBy 。You 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.