Hi Ernesto,
Thank you for reaching out to us.
To obtain the array of selected values from a given dropdown, you can access it through the Multiselect instance. By obtaining the current value of the Multiselect component, you can easily access the selected values.
Below is a sample code snippet that demonstrates how to achieve this:
<button v-on:click="handleButtonClick">Click me!</button> methods: { handleButtonClick() { var msObject = document.getElementById("multiselect").ej2_instances[0]; var arrayOfvalues = msObject.value; // You can get the array of selected values in "arrayOfvalues" variable } } |
By using document.getElementById("multiselect").ej2_instances[0], you can get the Multiselect instance, and then msObject.value provides you with the array of selected values. You can further process this array according to your requirements.
Attachment:
dropdown_63dcd5ce.zip