Hello everyone,
I'm having some issues on multiple selection for ListBox component. The necessary code is above.
The component loads correctly with the values but I can't check any item (it doesn't tick when I click)... Also when I click on the square near the search icon (select all) i get the following exception:
System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[System.Object]' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.
at Radzen.Blazor.RadzenListBox`1.SelectAll()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
|||||||||||||||||||||||||||||||| CODE |||||||||||||||||||||||||||||||||||||||||||||||||||\
<RadzenListBox AllowFiltering="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" TValue="IEnumerable<string>" @bind-Value="multipleLocations" Multiple="true" Data="@locations.ToList()"
Change="@(args => Change(args))" Style="height:200px;" />
IEnumerable<string> multipleLocations = new string[] { };
string[] locations = new string[] { "ex1", "ex2" };
Any tips for this?
Thanks in advance!