check/uncheck checked box when select row in table

UI Components for Angular
Post Reply
yong.niu
Posts: 1
Joined: 02 Aug 2016, 21:59

30 Aug 2016, 21:33

Hi there,

I have a table with checkbox column :

<p-dataTable [value]="items | async" selectionMode="single" layout-wrap="false" [resizableColumns]="false" scrollable="true" scrollHeight="200px" [(selection)]="selectedItem" (onRowSelect)="handleRowSelect($event)">
<p-column field="fied1" header="Field1" styleClass="pcolumn"></p-column>
<p-column field="fied2" header="Filed2" styleClass="pcolumn"></p-column>
<<p-column header=" " styleClass="pcolumn" [style]="{'width': '30px'}">
<template let-item="rowData">
<input #chkExtend id="" type="checkbox" (click)="checkClick(chkExtend.checked,item)">
</template>
</p-column>

</p-dataTable>

now I want to change the checkbox status when I click any column in the row. How can I do it

thanks

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest