Below is my Razor code
<RadzenDropDown Multiple="true" Chips="true" MaxSelectedLabels="15" AllowClear="true" AllowFiltering="true"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" Placeholder="Select Syllabus Objectives..."
TextProperty="Objective" ValueProperty="Objective"
Data="@DistinctSyllabusObjectives" @bind-Value="@questionDto.SyllabusObjectives"
Name="SyllabusObjectives" Class="w-100" Change="OnDropdownChange" />
Below is the code behind code
public class SyllabusObjectiveModel
{
public string Objective { get; set; }
}
DistinctSyllabusObjectives = new List<SyllabusObjectiveModel>()
{
new() { Objective = "Acid" },
new() { Objective = "Base" },
new() { Objective = "Salt" }
};
questionDto.SyllabusObjectives = new List<string> { "Acid", "Base", "Salt" };
I get this error, when checking or unchecking any items in dropdown, even removal of the item from the chip shows the same error.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Specified cast is not valid. System.InvalidCastException: Specified cast is not valid. at Radzen.DropDownBase1.<SelectItem>d__114[[System.Collections.Generic.IList
1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at Radzen.Blazor.RadzenDropDown1.<OnSelectItem>d__45[[System.Collections.Generic.IList
1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at Radzen.Blazor.RadzenDropDown1.<OnSelectItemInternal>d__47[[System.Collections.Generic.IList
1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],........