Tuesday, 9 April 2019

How to select multiple rows in ng2-smart-table component with checkbox?

I am using ng2-smart-table from https://akveo.github.io/ng2-smart-table/#/documentation

Live Demo: http://akveo.com/ngx-admin/pages/tables/smart-table

Please help me with below questions:

  1. I want to select multiple rows and call one function so where I need to write this code in ng2-smart-table?

  2. Can I select multiple rows and call one function on selected rows ?

I have written below code in .ts and .html files:

smart-table-component.ts:

 actions: {
      add: false,
      edit: true,
      delete: false,
      custom: [{ name: 'ourCustomAction'}],
      position: 'left',
      columnTitle: 'Actions'

    },   

    mode: 'external',

smart-table-component.html:

   <nb-card-body>
    <ng2-smart-table [settings]="settings" allowFiltering='true' allowPaging='true' [source]="windchillData"
     (deleteConfirm)="onDeleteConfirm($event)" (custom)="onCustomAction($event)" (edit)="onEdit($event)">
    </ng2-smart-table>
  </nb-card-body>



from How to select multiple rows in ng2-smart-table component with checkbox?

2 comments: