I'm having an issue with the DropDown component throwing the error in the title whenever I select a dropdown item. Here's my code:
<RadzenCard>
<h4 class="mb-4">Select Employee(s):</h4>
<RadzenDropDown AllowClear="true" Name="emp" TValue="string"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
FilterOperator="StringFilterOperator.Contains"
AllowFiltering="true"
Data=@allEmployees.Keys.ToList()
Placeholder="Begin Typing to Search..."
Multiple="true"
Value=@selectedEmployeeList />
</RadzenCard>
along with the associated CS code:
private Dictionary<string, int> allEmployees;
private IEnumerable<string> selectedEmployeeList;
protected override void OnInitialized(){
// populate the allEmployees Dictionary with employee names and IDs from SQL DB
}
The DropDown component successfully displays all of the existing employees, as well as the check marks next to their names for selection, but whenever I select a check box, I get the error stated in the title. I've gone through the documentation and done the correct binding. I'm choosing not to use the dbcontext
since dbcontext
object interactions are not thread-safe.