Skip to main content

SelectQuery.GroupFilterString Property

Specifies the filter criteria to add to the current SelectQuery containing grouped/aggregated columns.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public string GroupFilterString { get; set; }

Property Value

Type Default Description
String null

A String value.


The GroupFilterString property allows you to filter the result set returned by SelectQuery if it contains grouped/aggregated columns. For example, the following query will return only categories that contain a specific number of products.

SelectQuery selectQuery1 = new SelectQuery("MyQuery")
    .SelectColumn("ProductID", AggregationType.Count, "ProductsCount")

selectQuery1.GroupFilterString = "[ProductsCount] > 5";

To pass a QueryParameter (which can be accessed using the SqlQuery.Parameters property) to the filter string, precede the parameter name with the ? sign.

QueryParameter queryParam1 = new QueryParameter("Parameter1", typeof(Int32), 200);

selectQuery1.GroupFilterString = "[TotalStock] > ?Parameter1";
See Also