How can we clear/reset the selected item on a Radzen DropDown?
I did not use bind-Value to get the selected item.
Instead, I used Change()
to get the selected object.
However, if I select one item on the DropDown and change the content of tempLocations
, the selected item itself will not be cleared.
View:
<RadzenDropDown Name="Location" TValue="string" Data=@tempLocations Change=@(args => LocationChange(args))>
<Template Context = "location">
@($"{location.id}:{location.name}")
</Template>
</RadzenDropDown>
I guess there will be no solution expect using
bind-Value
.Here is my updated coding:
tempSelectedLocation
is a class object.