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

Dropdownlist click event

Hi,


i have in my Project a dropdownlist. The items from this dropdownlist comes from my database with feathersvuex. So it is dynamically and it can be changed.

<ejs-dropdownlist id='games' :dataSource='currencies' :fields='fieldscurrencies' ></ejs-dropdownlist>

Now i want to trigger a click event for each item from this dropdownlist. 
When i add a new item from the database into the dropdownlist this have to be a click event also. So my dropdownlist have to handle dynamic items. How can i solve this? 

3 Replies

AB Ashokkumar Balasubramanian Syncfusion Team August 8, 2019 09:10 AM UTC

Hi Nurhan Aydogdu, 
 
Good day to you. 
 
For this scenario, we suggest use the select event for Dropdown List component, because this event triggered on each item selection in Dropdown List and also, we were able to get the corresponding selected items details in this event arguments. Could you please check the below sample? 
 
 
Please check the sample and get back to us, if you require any further assistance on this. 
 
Regards, 
Ashokkumar B. 



NA Nurhan Aydogdu August 16, 2019 07:39 AM UTC


Hi Ashokkumar, 

thank you for you support. Your sample is working for me. Can you tell me how can i set an default item at page loading? When i load the page
i don't want an empty dropdownitem. İ want to set a default value- item. 



AB Ashokkumar Balasubramanian Syncfusion Team August 19, 2019 09:47 AM UTC

Hi Nurhan Aydogdu, 
 
We are glad to hear that the provided solution worked for you. If you want to display the DropdownList with value, you can use the value property to specify it. Please find the below modified sample. 
 
 
Please check the sample and get back to us, if you need any further assistance on this. 
 
Regards, 
Ashokkumar B. 


Loader.
Live Chat Icon For mobile
Up arrow icon