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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get selected values from multiselect checkbox

Thread ID:

Created:

Updated:

Platform:

Replies:

148142 Oct 8,2019 02:30 AM UTC Oct 8,2019 09:22 AM UTC Angular - EJ 2 1
loading
Tags: MultiSelectDropdown
jose lara
Asked On October 8, 2019 02:30 AM UTC

Hi, I am following this example - https://ej2.syncfusion.com/angular/demos/?_ga=2.203148561.1665470057.1569768206-867896921.1564449587#/material/multi-select/checkbox

I am looking for a way to get an array with all the selected Ids for the items that were checked(selected) from a multiselect dropdown component, upon a button click event. 




Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On October 8, 2019 09:22 AM UTC

Hi Jose, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your requirement “Get selected values from multiselect checkbox” and it can be achieved using value property based on applied filed settings. You can also get the popup display value using text property. Please check the below code snippet, 
 
app.component.html 
<ejs-multiselect id='multiselect-checkbox' #checkbox [dataSource]='countries' [placeholder]='checkWaterMark' [fields]='checkFields' 
                    [mode]='mode' [popupHeight]='popHeight' [showDropDownIcon]='true' showSelectAll='true' [filterBarPlaceholder]='filterPlaceholder'></ejs-multiselect> 
<button (click)="btnclick()">Get Selected Value</button> 
 
app.component.ts 
import { MultiSelectComponent } from '@syncfusion/ej2-angular-dropdowns'; 
 
@ViewChild('checkbox', {static: true}) 
public mulObj: MultiSelectComponent; 
 
btnclick() {  
    console.log(this.mulObj.value); 
} 
 
 
Could you please check the above sample and get back to us if you need any further assistance on this? 
 
Regards, 
Vinoth Kumar S 


CONFIRMATION

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