DataGrid OData

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

In this demo the Employees are loaded from an OData service with the Title and Customers columns using multi-select dropdown filters with FilterTemplate to query related data from the server.

ID
First Name
Last Name
Title
Customers
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;
}
            
✨ 오늘의 명언 & 마음의 양식

“위대한 일을 하는 유일한 방법은 당신이 하는 일을 사랑하는 것이다.”

— 스티브 잡스 (애플 창업자)

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 🗙