I want to design a common radzen data grid for multiple data types. Which means on the razor page I have common markup for radzen data grid. Record set and column definition bind to the grid dynamically. My problem is with ‘TItme’.
I need something like: TItem="typeof(data.records[0])"
Sorry my question was wrong about simple filtering. The real problem is I need to do client-side filtering. I no need to call to the DB each time user enters a filter term. This is not working. Any suggestions?
Below is what I’m testing on…
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await LoadGridData();
StateHasChanged();
}
}
protected async Task LoadGridData()
{
isLoading = true;
var uri = new Uri("https://services.radzen.com/odata/Northwind/Employees");
var response = await new HttpClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, uri));
var result = await response.ReadAsync<ODataServiceResult<IDictionary<string, object>>>();
data = result.Value.AsODataEnumerable();
count = result.Count;
isLoading = false;
}