Closed RipleWare closed 6 years ago
There are simple solution for it.
Remove ColSpan and RowSpan from table.
Put <td style="display:none"></td>
tag.
It will work,
ERROR TypeError: Cannot set property '_DT_CellIndex' of undefined
at _fnCreateTr (jquery.dataTables.js:3140)
at _fnAddData (jquery.dataTables.js:2453)
at HTMLTableRowElement.
I'm getting this error when using datatable
This my html file :
<table class="table table-striped" datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger">
<tbody>
<tr
*ngFor="let user of users;">
<!-- data table-->
<ng-container *ngIf="user.is_deleted == 0 && user.role == 'u' ">
<td> {{ user.name }} </td>
<td> {{ user.email }} </td>
<td> {{ user.phone }} </td>
<td> {{user.address}} {{user.city}} {{user.state}} ({{user.zip}}) </td>
<!-- <td *ngIf="user.status == 1 ; else elseStatus" class="text-success"> Active </td>
<ng-template #elseStatus class="text-danger"> Inactive </ng-template>
<td> <button (click)="editUser( user._id )" class="btn btn-outline-primary"> Edit </button></td>
<td> <button (click)="deleteUser( user._id )" class="btn btn-outline-danger"> Delete </button> </td>
<td> <a *ngIf="user.status == 1" (click)="deactivateUser(user._id)"
class="btn btn-outline-secondary"> Deactivate </a> </td> -->
</ng-container>
</tr>
</tbody>
</table>
I'm submitting a...
Problem
I am populating a datatable using the following array:
And have been assisted to produce my datatable using the following code:
This populates into the datatable fine and give me the following output (concept view only):
However, it produces the following error in the console:
It also prevents the table header column sorting from working and the tool buttons (such as print and csv export). I'm assuming it has something to do with
rowspan
but I can't find any information on how to correct this issue.My controller code for my datatable looks like so:
Environment