This is a bit difficult to communicate but I will try my best.
I have a database that I access using entity framework, for simplicity I have 2 tables:
I basically call the dbcontext (with lazyloading enabled) to return all IQueryable and I place them in the radzen datagrid without any problem.
However, "Assistance" class has an object "List" that points to an item in the List table and there are items from the list table I want to present with the assistance. Lets say that these two tables have the following items:
And I want to present both in the table so I do the following:
<RadzenDataGrid @ref="main_grid" AllowFiltering="true" TItem="Assistance" AllowColumnResize="true" FilterMode="FilterMode.Simple" PageSize="10" AllowPaging="true" AllowSorting="true" Data="@assistances" LogicalFilterOperator="LogicalFilterOperator.Or"> <Columns> <RadzenDataGridColumn TItem="Assistance" Visible="false" Property=@nameof(Assistance.Name) Title="Name" /> <RadzenDataGridColumn TItem="Assistance" Context="data" Property=@nameof(Assistance.List.ListName) SortProperty="List.ListName" Title="List Name"> <Template> @data.List.ListName </Template> </RadzenDataGridColumn> </Columns> </RadzenDataGrid>
Using Lazy Loading from entity framework, I am now able to see the Name from [Assistance] table and the ListName from [List] table corresponding to this assistance which is super cool. I am also able to sort the ListName using the sort button in the title. My problem is I am not able to do a filter on this data, I think there is a bug somewhere because if I add (FilterProperty="List.ListName") into the RadzenDataGridColumn tag then I get an error that "ListName" does not exist in the Assistance.
I am confused as to why the sorting works but the filter fails?
Am I missing something? I am working on a very big project and this is a major factor in whether our team would be able to use this datagrid or not and I appreciate your help in advance.