Hello
is there any possibility pass TextProperty as an argument to Change Event?
My Dropdown is like:
<RadzenDropDown @bind-Value="stavby.Ds_Drs" Data="@drss" TextProperty="Name" ValueProperty="Code" Style="width:100%" Change=@(args=>OnChangeDdrs(args,stavby))>
<Template>
@((context as KN_cis).Code) - @((context as KN_cis).Name)
</Template>
</RadzenDropDown>
`
I would like to catch TextProperty="Name" in my Method OnChangeDdrs(args,stavby).
Thanks.
Change event is tied to the ValueProperty - if you remove it the whole object will be passed to Change event however in this case @bind-Value will not work. You can either remove both TextProperty/ValueProperty and use Change event to update desired object value and Template/ValueTemplate to specify what will be displayed and or you can stay with your current setup, search your collection to find the object by Code/Ds_Drs and get the Name.