The dropdown and dropdowndatagrid show errors when filtering with my custom objects:
Error: No applicable method 'ToLower' exists in type 'Object' (at index 27) blazor.server.js:15:27309
log https://localhost:44398/_framework/blazor.server.js:15
C https://localhost:44398/_framework/blazor.server.js:8
S https://localhost:44398/_framework/blazor.server.js:8
invokeClientMethod https://localhost:44398/_framework/blazor.server.js:1
invokeClientMethod https://localhost:44398/_framework/blazor.server.js:1
processIncomingData https://localhost:44398/_framework/blazor.server.js:1
onreceive https://localhost:44398/_framework/blazor.server.js:1
onmessage https://localhost:44398/_framework/blazor.server.js:1
This example reproduces the problem
@page "/dddg"
<RadzenDropDownDataGrid TValue="int" Data="@options" TextProperty="Name" ValueProperty="Id"
AllowClear="false" AllowFiltering="true" Multiple="false" Disabled="false"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" @bind-Value="@selectedValue"
Change="@OnChanged" Placeholder="Select an item..." Style="width: 100%" />
@code {
public class TestClass
{
public string Name { get; set; }
public int Id { get; set; }
}
protected TestClass[] options { get; set; }
protected int selectedValue { get; set; }
protected async Task OnChanged(object args)
{
}
protected override async Task OnInitializedAsync()
{
options = new TestClass[]
{
new TestClass() { Id = 1, Name = "Item 1"},
new TestClass() { Id = 2, Name = "Item 2"},
new TestClass() { Id = 3, Name = "Item 3"},
new TestClass() { Id = 4, Name = "Item 4"},
new TestClass() { Id = 5, Name = "Item 5"},
};
await base.OnInitializedAsync();
}
}
This code works using v1.2.9. In v1.2.10+ it is broken. I think it is related to some changes done in DataBoundFormComponent.View and PropertyAccess.IsAnonymous(Type)