I tried, passing disabled attribute p-tableheadercheckbox to unable the checkbox.
<p-tableHeaderCheckbox [disabled]=false>
enter code here<ng-template pTemplate="header">
<tr>
<th style="width: 3rem">
<p-tableHeaderCheckbox [disabled]=false></p-tableHeaderCheckbox>
</th>
<th>Recharge Amount ({{rupeeSymbol}})</th>
<th>Tag Account</th>
<th>Plate No.</th>
<th>Tag Serial No.</th>
<th>Vehicle Class</th>
<th>Minimum Threshold ({{rupeeSymbol}})</th>
<th>Current Balance ({{rupeeSymbol}})</th>
</tr>
</ng-template>
CodePudding user response:
you probably have not assigned any value for p-table
tableValue = [
{ rechargeAmt: 123, tagAccount: 2012, plateNo: 123, tagSerialNo: "asdasd", ...},
];
<p-table [value]="tableValue">
<ng-template pTemplate="header">
<tr>
<th style="width: 3rem">
<p-tableHeaderCheckbox [disabled]="false"></p-tableHeaderCheckbox>
</th>
<th>Recharge Amount ({{ rupeeSymbol }})</th>
<th>Tag Account</th>
<th>Plate No.</th>
<th>Tag Serial No.</th>
<th>Vehicle Class</th>
<th>Minimum Threshold ({{ rupeeSymbol }})</th>
<th>Current Balance ({{ rupeeSymbol }})</th>
</tr>
</ng-template>
</p-table>