This is a migrated thread and some comments may be shown as answers.

ValueChanged Error

1 Answer 719 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Veteran
Jonathan asked on 03 Jun 2020, 03:34 PM

Hi..

What is wrong?  When the value changes I need to set values to other textboxes. What is wrong with my 'tags'?

When I set @bind-value , I get error that I can't have 2 change events.

I also need to bind to FoodType property.

 

thx again!

 

Telerik.Blazor.Components.TelerikDropDownList`2[CKonboard.Data.Models.EventFoodType,System.String] requires a value for the 'ValueExpression' ValueExpression is provided automatically when using 'bind-Value'.
   at Telerik.Blazor.Components.Common.TelerikSelectBase`2.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Telerik.Blazor.Components.Common.TelerikSelectBase`2.SetParametersAsync(ParameterView parameters)

 

 <TelerikDropDownList Id="FoodType"
                         ValueChanged="@((string c) => EventSelected(c))"
                         Value="@Service.FoodType"
                         Data="@Lookups.EventFoodTypes()"
                         TextField="EvtType"
                         DefaultText="-Select First Event Food Type"
                         ValueField="EvtType"
                         PopupWidth="200px"
                         Width="200px"
                         PopupHeight="130PX"
                         Class="ddl-no-bg">

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 03 Jun 2020, 03:43 PM

Hi Jonathan,

You can read more about the error and its solutions in this article: https://docs.telerik.com/blazor-ui/knowledge-base/requires-valueexpression

When using the <Parameter>Changed event, you can use @bind-<Parameter>, that's how the framework operates.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
DropDownList
Asked by
Jonathan
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or