When there's a null entry in the checkboxlist filter, it shows blank, but selecting it doesn't show any entries.
After applying, No records:
I'd expect to see everyone who has a null Employee1.
This is probably something that could be handled in my/consumer's models, but I feel like there should be a difference between empty strings, ""
, and nulls, so that they could be filtered separately. A null could be there's no Boss, and an empty string could mean Boss doesn't have a Title.
Using the Radzen.WebAssembly.sln
,
RadzenBlazorDemos\Pages\DataGridCheckBoxListFilter.razor
I added this Include at the bottom to make sure data loaded,
.Include("Employee.Employee1")
I added this column after the Employee column.
<RadzenDataGridColumn Property="Employee.Employee1.LastName" Title="Reports To">
<Template Context="order">
<RadzenImage Path="@order.Employee?.Employee1?.Photo" Style="width: 32px; height: 32px;" class="rz-border-radius-4 rz-me-2" AlternateText="@(order.Employee.Employee1?.FirstName + " " + order.Employee.Employee1?.LastName)" />
@order.Employee.Employee1?.FirstName @order.Employee.Employee1?.LastName
</Template>
</RadzenDataGridColumn>
Also, to make the demo data model easier to understand, on the Employee class:
ReportsTo should be renamed to ReportsToID
Employee1 should be renamed to ReportsTo
Employees1 should be renamed to Employees or Staff/Subordinates.