Let users filter, sort, group and arrange a Blazor DataGrid in natural language. RadzenAIChat tools call the grid API, so every request becomes a regular grid operation the user can see and undo.
Order | Customer | Employee | Order date | Freight | Ship country | Ship city |
|---|---|---|---|---|---|---|
| 10248 | Vins et alcools Chevalier | Buchanan | 07/04/2023 | ¤32.38 | France | Reims |
| 10249 | Toms Spezialitäten | Suyama | 07/05/2023 | ¤11.61 | Germany | Münster |
| 10250 | Hanari Carnes | Peacock | 07/08/2023 | ¤65.83 | Brazil | Rio de Janeiro |
| 10251 | Victuailles en stock | Leverling | 07/08/2023 | ¤41.34 | France | Lyon |
| 10252 | Suprêmes délices | Peacock | 07/09/2023 | ¤51.30 | Brazil | Charleroi |
| 10253 | Hanari Carnes | Leverling | 07/10/2023 | ¤58.17 | Brazil | Rio de Janeiro |
| 10254 | Chop-suey Chinese | Buchanan | 07/11/2023 | ¤22.98 | Switzerland | Bern |
| 10255 | Richter Supermarkt | Dodsworth | 07/12/2023 | ¤148.33 | Switzerland | Genève |
The assistant is a RadzenAIChat with Tools created from methods of the page: FilterColumn calls SetFilterOperator and SetFilterValue on the matching column,
SortByColumn calls OrderBy, GroupByColumn adds a GroupDescriptor to Groups and SetColumnVisibility toggles the column Visible parameter.
The model picks the tool from the user's words and the system prompt lists the available columns. AllowMultipleToolCalls="false" keeps the model to one grid operation per step so the grid updates in order.
RadzenAIChat receives tools created from page methods that call the grid API - SetFilterValue, OrderBy, Groups and column Visible. The model picks the tool from the user's words.
Radzen Blazor Components, © 2018-2026 Radzen.
Source Code licensed under
MIT