Hi!
Basically when the value get changed in the dropdown , it get passed inside the ChangeEventArgs e .
so if you wanna make an event as OnValueSelect and implement a function for it
first you have to make the function take a parameter of the type you wanna get from the dropDown .
for example if the value type is string then you will make the function take a string parameter .
and it will be like :
<SfDropDownList TItem="GameFields" TValue="string" PopupHeight="230px" Placeholder="Select a game" @bind-Value="@DropVal" DataSource="@Games"> <DropDownListEvents TValue="string" ValueChange="OnChange" OnValueSelect="@((e)=>OnSelect(e.value))">DropDownListEvents> <DropDownListFieldSettings Text="Text" Value="ID">DropDownListFieldSettings> SfDropDownList>
@{ public void OnSelect( string e ) { // here u can use the e to do what u want }
} |
also i degust using ValueChange rather then OnValueSelect.