GitHub

DataGrid OData

Use the LoadData event to get data from a REST service.

ID
Photo
First Name
Last Name
Title
Title Of Courtesy
Birth Date
Hire Date
Address
City
Region
Postal Code
Country
Home Phone
Extension
Notes

Data-bind to a service

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).


async Task LoadData(LoadDataArgs args)
{
    var result = await service.GetEmployees(filter: args.Filter, top: args.Top, skip: args.Skip, orderby: args.OrderBy, count: true);
    employees = result.Value.AsODataEnumerable();
    count = result.Count;
}
            

Source Code licensed under MIT

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