1
votes

I want to get all the filter data from table, suppose i have

<p-dataTable #dt [value]="list" selectionMode="multiple" [(selection)]="selection"  [rows]="2"[paginator]="true" >
       <p-column selectionMode="multiple"></p-column>
       <p-column field="description" header="description" [filter]="true"></p-column>

now once i do filter the rows, and do a select all, i want to select all the rows which are filter, only only in that particular page, but across all pagination.

I have tried, this.dt.dataToRender, but it only provides data that is filtered but its only limited to that particular page.

1

1 Answers

2
votes

Set this property headerCheckboxToggleAllPages to true.

From the Documentation

When set to true, the header checkbox on paged DataTables with checkbox multiple selection enabled will toggle the selection of items across all pages

This is an Example