Select theme:

Material 3
warning

You are viewing the legacy Radzen documentation.

Radzen Blazor Studio has replaced Radzen as the primary RAD tool for Blazor applications.

Radzen Blazor Studio offers a modern UI, enhanced features, and improved performance to streamline your development process.

The latest documentation for Radzen Blazor Studio is available here: https://www.radzen.com/blazor-studio/documentation/

Open Radzen Blazor Studio docs

Default filter value for DataGrid column (Angular)link

This guide demonstrates how to set default filter value for DataGrid column.

Source Code

Step by steplink

1. Create new application with .NET server-side project and add new MSSQL data-source connected to Northwind database.

2. Create new Orders page and bind DataGrid to Orders table. image image image

3. Add new Page property defaultOrderID, define $filter parameter for Northwind.getOrders method invoke on Page load event, define $filter parameter ${event.filter ? event.filter + ' and ':''}OrderID eq ${defaultOrderID} for Northwind.getOrders method invoke on DataGrid LoadData and bind DataGrid OrderID column to defaultOrderID. image image image

4. Set defaultOrderID to this.grid0.columns.first.filterValue in DataGrid LoadData event and define $filter parameter ${event.filter ? event.filter + ' and ':''}${this.defaultOrderID ? 'OrderID eq ' + this.defaultOrderID : ''} for Northwind.getOrders method invoke on DataGrid LoadData. image image

5. Run the application image

In this article —
© 2016-2025 Radzen Ltd. All Rights Reserved.
Designed and developed with ❤️ in Radzen Blazor Studio.

Select theme:

Material 3