GitHub

DataGrid LoadData

The LoadData event allows you to perform custom paging, sorting and filtering.
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(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 desktop tool that empowers developers to create beautiful business Blazor apps. Develop your Blazor Server and WebAssembly applications visually with familiar WYSIWYG interface.


Source Code licensed under MIT

New

Radzen
Blazor Studio

Radzen Blazor Studio is a desktop tool that empowers developers to create beautiful Blazor apps.

Develop your Blazor Server and WebAssembly applications visually with familiar WYSIWYG interface.

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