DataGrid LoadData

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 Name
Last Name
Job Title
Title
Birth Date
Hire Date
Address
City
Region
Postal Code
Country
Home Phone
Extension
Notes

Perform custom data-binding

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();


} 
            
✨ 오늘의 명언 & 마음의 양식

“언제나 불가능해 보이던 일도 이루어지기 전까지는 그렇다.”

— 넬슨 만델라 (남아프리카 공화국의 정치가, 인권 운동가)

Demos Configuration

Premium Themes

  • Material 3
  • Material 3 Dark
  • Fluent
  • Fluent Dark

Free Themes

  • Material
  • Material Dark
  • Standard
  • Standard Dark
  • Default
  • Dark
  • Humanistic
  • Humanistic Dark
  • Software
  • Software Dark
An error has occurred. This app may no longer respond until reloaded. Reload 🗙