We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ValueChange does not fire

Thread ID:





146435 Aug 3,2019 08:46 AM UTC Jul 17,2020 01:47 PM UTC Blazor 4
Tags: Dropdown List
ebi torabi
Asked On August 3, 2019 08:46 AM UTC

            <EjsDropDownList Placeholder="NewshaCategory" ID="NewshaCategory" TValue="NameId" EnableRtl="true" AllowFiltering=true IgnoreAccent=true  DataSource="@NewshaCategoriesList">
                <DropDownListFieldSettings Value="Id" Text="Name"></DropDownListFieldSettings>
                <Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents   TValue="NameId"  ValueChange="@NewshaCategorySelected"></Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents>


 public void NewshaCategorySelected(Syncfusion.EJ2.Blazor.DropDowns.ChangeEventArgs<NameId> args  )

        Description1 = "hello";

Berly Christopher [Syncfusion]
Replied On August 5, 2019 09:38 AM UTC

Hi Ebi, 

Greetings from Syncfusion support.  

While analyzing the provided code, we found that you bound the Value and Text variable of the DropDownListFieldSettings to the TValue. So, we suggest you to bind the type of Value and Text in the DropDownListFieldSettings to the TValue as mentioned In the below code example to get rid of the reported issue. Also, if you bind the event for the DropDownList component, there is no need to add “@” as the prefix of the event name.  

@using Syncfusion.EJ2.Blazor.DropDowns 
<EjsDropDownList Placeholder="NewshaCategory" ID="NewshaCategory" TValue="string" EnableRtl="true" AllowFiltering=true IgnoreAccent=true DataSource="@NewshaCategoriesList"> 
    <DropDownListFieldSettings Value="ID" Text="Text"></DropDownListFieldSettings> 
    <Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents TValue="string" ValueChange="NewshaCategorySelected"></Syncfusion.EJ2.Blazor.DropDowns.DropDownListEvents> 
    public class Games 
        public string ID { get; set; } 
        public string Text { get; set; } 
    List<Games> NewshaCategoriesList = new List<Games> { 
    new Games() { ID= "Game1", Text= "American Football" }, 
    new Games() { ID= "Game2", Text= "Badminton" }, 
    new Games() { ID= "Game3", Text= "Basketball" }, 
    new Games() { ID= "Game4", Text= "Cricket" }, 
    new Games() { ID= "Game5", Text= "Football" }, 
    new Games() { ID= "Game6", Text= "Golf" }, 
    new Games() { ID= "Game7", Text= "Hockey" }, 
    new Games() { ID= "Game8", Text= "Rugby"}, 
    new Games() { ID= "Game9", Text= "Snooker" }, 
    new Games() { ID= "Game10", Text= "Tennis"}, 
    public string Description1 { get; set; } 
    public void NewshaCategorySelected(Syncfusion.EJ2.Blazor.DropDowns.ChangeEventArgs<string> args) 
      Description1 = "hello"; 

Please find the sample from the below link. 

To know more about DropDownList in Blazor platform, please refer the below documentation link.  

Berly B.C 

ebi torabi
Replied On August 5, 2019 11:48 AM UTC

Hi Berly 
Thank you . It works very well

Replied On July 16, 2020 01:25 PM UTC

Hello this My code,

  <SfMultiSelect AllowFiltering="true" Value="@MultiVal" Mode="@VisualMode.Box" Query="@Query" TValue="string[]" Placeholder="Chercher une ville">
                        <SfDataManager Url="api/towns/autocomplete" Adaptor="Syncfusion.Blazor.Adaptors.UrlAdaptor" CrossDomain=true></SfDataManager>
                        <MultiSelectFieldSettings Value="code" Text="name"></MultiSelectFieldSettings>
                        <MultiSelectEvents TValue="string[]" ValueChange="onChange"></MultiSelectEvents>

Event is not fired directly when values changed but only when i click out side of SfMultiSelect is there any way to change that?

Thank you.

Jeyanth Muthu Pratheeban Sankara Subramanian [Syncfusion]
Replied On July 17, 2020 01:47 PM UTC

Hi Ebi,

Thanks for your update.

We would like to know you that by default, change event will trigger after selecting or removing values only when focus out the control. To override this behavior, and to fire this event during changing the value, we suggest you to set ChangeOnBlur as false. Please find the UG link below.

UG Link : https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfMultiSelect-1.html#Syncfusion_Blazor_DropDowns_SfMultiSelect_1_ChangeOnBlur



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon