The LoadData event allows you to perform custom paging, sorting and filtering.
In this demo the Job Title column uses a multi-select dropdown filter with FilterTemplate, and a Reset button clears all grid state including filters, sorts, and paging to return to the initial view.
ID | Photo | First Namefilter_alt | Last Namefilter_alt | Job Titlefilter_alt | Titlefilter_alt | Birth Datefilter_alt | Hire Datefilter_alt | Addressfilter_alt | Cityfilter_alt | Regionfilter_alt | Postal Codefilter_alt | Countryfilter_alt | Home Phonefilter_alt | Extensionfilter_alt | Notesfilter_alt |
|---|
1. Set the Data and Count properties.
<RadzenDataGrid Count="@count" Data="@employees"
2. Handle the LoadData event and update the Data and Count backing fields (employees and count in this case).
void LoadData(LoadDataArgs args)
{
var query = dbContext.Employees.AsQueryable();
if (!string.IsNullOrEmpty(args.Filter))
{
query = query.Where(grid.ColumnsCollection);
}
if (!string.IsNullOrEmpty(args.OrderBy))
{
query = query.OrderBy(args.OrderBy);
}
count = query.Count();
employees = query.Skip(args.Skip.Value).Take(args.Top.Value).ToList();
}
Radzen Blazor Components, © 2018-2025 Radzen.
Source Code licensed under
MIT