How to enable number of count of selected item from drop down list and show in dropdown field instead of all selected items?

How to enable to show number of count of selected item from drop down list and show in drop down field, instead of all selected items?
i just want to show number of count selected in drop down instead of showing all selected items. please tell me how we can show from e-j drop down list.

1 Reply

KV Karthikeyan Viswanathan Syncfusion Team July 5, 2018 02:31 PM UTC

Hi kapil Gupta 
  
Thanks for contacting Syncfusion support. 
 
 
As per your requirement, you can modify the displayed text using change and create event in MultiSelect. 
 
Please refer the below code example: 
 
<code> 
div> 
    <ejs-multiselect id="games" dataSource="@ViewBag.data" placeholder="Favorite Sports" [email protected] change="onSelection" created="onSelection"> 
        <e-multiselect-fields value="Id" text="Game"></e-multiselect-fields> 
    </ejs-multiselect> 
   
 
</div> 
</code> 
<code> 
<script type="text/javascript"> 
    function onSelection() { 
        var wrapper = ej.base.closest(this.element, ".e-multiselect.e-input-group"); 
        wrapper.querySelector(".e-delim-view.e-delim-values").innerHTML = this.value.length + " items selected."; 
    } 
</script> 
 
</code> 
 
We have prepared a sample based on your requirement. Please find the Sample link: http://www.syncfusion.com/downloads/support/forum/138528/ze/valuetypes-1896325837.zip  
 
Regards,  
Karthikeyan V.  


Loader.
Up arrow icon