-2

In the prime datatable I have a checkbox to select multiple rows. When I select or unselect the checkbox, all the rows get selected/unselected correctly. On selecting or unselecting the checkbox I want to disable few buttons at the top. Hence I need help in knowing the attribute to capture selection.

<p-dataTable> 
    <p-column selectionMode="multiple">
    </p-column>
</p-dataTable>
Antikhippe
  • 6,316
  • 2
  • 28
  • 43
Zack
  • 1

2 Answers2

0

use onRowSelect and onRowUnselect events for example : (onRowSelect)="updateSelected($event)" (onRowUnselect)="updateSelected($event)"

-1

onHeaderCheckboxToggle did the trick.

Baum mit Augen
  • 49,044
  • 25
  • 144
  • 182
Zack
  • 1