I get following exception when I click column to sort,
System.InvalidOperationException: No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic
here is my code
@page "/roles"
@using CMSAdmin.Shared
@using Syncfusion.EJ2.RazorComponents
@using Syncfusion.EJ2.RazorComponents.Grids
@using Syncfusion.EJ2.RazorComponents.Inputs
@using Syncfusion.EJ2.RazorComponents.Popups
@inject HttpClient Http
@if (roles == null)
{
<p><em>Loading...</em></p>
}
else
{
<EjsGrid id="Grid" DataSource="@roles" AllowSorting="true">
<GridColumns>
<GridColumn Field=@nameof(Role.Id) HeaderText="Id" Visible="false" AllowSorting="true" ></GridColumn>
<GridColumn Field=@nameof(Role.Name) HeaderText="Role" AllowSorting="true" ></GridColumn>
<GridColumn Field=@nameof(Role.Description) HeaderText="Description" AllowSorting="false" ></GridColumn>
<GridColumn Field=@nameof(Role.IsActive) HeaderText="Is Active" AllowSorting="false" ></GridColumn>
</GridColumns>
</EjsGrid>
}
@functions {
//Role[] roles;
IList<Role> roles;
EjsGrid defaultGrid;
protected override async Task OnInitAsync()
{
roles = await Http.GetJsonAsync<IList<Role>>("api/roles");
}
}