Reputation: 306
I Used data tables in my normal table. I only used datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger"
:
<table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger" class="table table-default table-sm table-striped">
<tr>
<th>Pay Units</th>
<th>IsActive</th>
<th></th>
<th><i class="fa fa-rotate-right" (click)="Refresh()"></i></th>
</tr>
<tbody>
<tr *ngFor="let payunit of PayUnits">
<td>{{payunit.Name}}</td>
<td><input type="checkbox" [(ngModel)]="payunit.IsActive"></td>
<td><i (click)="setUpDate(payunit)" class="fa fa-edit editbtn"></i></a></td>
<td><i (click)="delete(payunit.ID)" class="fa fa-close reject"></i></a></td>
</tr>
</tbody>
</table>
but it gives error
Cannot read property 'mData' of undefined how to solve this error:
Upvotes: 0
Views: 692
Reputation: 584
Column miss match between angular databind and html view.
Upvotes: 1