GitHub
auto_awesome

Enjoy Material 3

This is a preview of Radzen's new Material 3 premium theme, available only to Radzen Professional or Enterprise subscribers.

Browse components with a free theme by selecting one from the dropdown above.

DataGrid LoadData

The LoadData event allows you to perform custom paging, sorting and filtering.
ID
Photo
First Name filter_alt
Last Name filter_alt
Job Title filter_alt
Title filter_alt
Birth Date filter_alt
Hire Date filter_alt
Address filter_alt
City filter_alt
Region filter_alt
Postal Code filter_alt
Country filter_alt
Home Phone filter_alt
Extension filter_alt
Notes filter_alt

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(args.Filter);
    }

    if (!string.IsNullOrEmpty(args.OrderBy))
    {
        query = query.OrderBy(args.OrderBy);
    }

    count = query.Count();

    employees = query.Skip(args.Skip.Value).Take(args.Top.Value).ToList();


} 
            

Introducing Radzen Blazor Studio

Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.


Source Code licensed under MIT

New

Radzen
Blazor Studio

Accelerated, smarter, and cost-effective Blazor development

Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

An error has occurred. This app may no longer respond until reloaded. Reload 🗙