Grid Multiselect

How do i get the selected values in the grid?



  public modeany = 'checkbox';
  public checkWaterMarkstring = 'Select Pods';
  public podFieldsObject = { text: 'podName'value: 'projectPodId' };
public popHeightstring = '350px';


  <e-column  headerText='Pod Assignment'
                                                                textAlign='Left' width=90>
                                                                <ng-template #template let-data>
                                                                    <div>
                                                                      
                                                                        <ejs-multiselect id='multiselect-checkbox' #multiselectCheckbox name="pods"
                                                                        id="pods" [dataSource]='aPods' [placeholder]='checkWaterMark'
                                                                        [fields]='podFields' [mode]='mode' [popupHeight]='popHeight'
                                                                        [showDropDownIcon]='true' showSelectAll='true'
                                                                        [(ngModel)]="data.podSelValue" [filterBarPlaceholder]='filterPlaceholder'
                                                                        [value]="data.podSelValue">
                                                                    </ejs-multiselect>
                                                                    </div>
                                                                </ng-template>
                                                            </e-column>

2 Replies 1 reply marked as answer

VI vin replied to vin February 23, 2021 02:22 AM UTC

How do i get the selected values in the grid?



  public modeany = 'checkbox';
  public checkWaterMarkstring = 'Select Pods';
  public podFieldsObject = { text: 'podName'value: 'projectPodId' };
public popHeightstring = '350px';


  <e-column  headerText='Pod Assignment'
                                                                textAlign='Left' width=90>
                                                                <ng-template #template let-data>
                                                                    <div>
                                                                      
                                                                        <ejs-multiselect id='multiselect-checkbox' #multiselectCheckbox name="pods"
                                                                        id="pods" [dataSource]='aPods' [placeholder]='checkWaterMark'
                                                                        [fields]='podFields' [mode]='mode' [popupHeight]='popHeight'
                                                                        [showDropDownIcon]='true' showSelectAll='true'
                                                                        [(ngModel)]="data.podSelValue" [filterBarPlaceholder]='filterPlaceholder'
                                                                        [value]="data.podSelValue">
                                                                    </ejs-multiselect>
                                                                    </div>
                                                                </ng-template>
                                                            </e-column>

?


MN Manikandan Nallathambi Syncfusion Team February 23, 2021 04:59 AM UTC

Hi vin, 
 
Thanks for contacting Syncfusion support. 
 
You can get the multiselect component's selected values using its change event. Please find the below code snippets and sample on achieving this requirement for your reference, 

App.component.html 

<e-column headerText="MultiSelect" width="150" textAlign="Center"> 
        <ng-template #template let-data> 
          <div> 
            <ejs-multiselect id='multiselect' [placeholder]="placeholder" [dataSource]='data1' [fields]="fields" (change)="changevalue($event)"></ejs-multiselect> 
            </div>         
        </ng-template> 
      </e-column> 


App.component.ts 
 
changevalue(args){ 
    console.log(args.value.toString()) 
  } 




Please get back to us if you need further assistance. 

Regards 
Manikandan N

Marked as answer
Loader.
Up arrow icon