Query builder (Blazor)
The Radzen Query builder allows you to specify the filter and sort order of Invoke data source method actions.
To open the Query Builder click the “Create query” button next to the Parameters label.
In the Query builder you can filter data and set the sort order. You can also combine filters via AND and OR logic.
Important! String values must be quoted e.g.
"${stringProperty}"
or"test"
. Date-time values can be picked with date-picker. You can use expressions (${}
) to specify values.
Combine DataGrid filters entered by the user with filter specified in the Query Builder
Let’s build Orders by customer page with a DropDown component for Northwind Customers
and DataGrid for selected customer Orders
.
- Add a DropDown and bind it to Northwind
Customers
. - Add a DataGrid and bind it to Northwind
Orders
. - Handle the DropDown Change event, set a new page property with Name
customerId
and Value${event}
. Then execute${this.Load()}
to reload the DataGrid. - Open the Query builder in the Page Load event and add an additional filter CustomerID equals
"${customerId}"
. - Run the application, select customer and filter orders by customer.