I try to give the Bootstrap-table style to a table, but I mark the following error and I do not know why, if in other tables it works:
Uncaught TypeError: Cannot read property 'field' of undefined
at HTMLTableCellElement.<anonymous>
// add BootstrapTable
$("#datosTable").bootstrapTable({
pagination: true,
showFooter: true,
search: true,
showExport:true,
filter: true,
method: 'post',
showRefresh:true,
pageList:[10, 25, 50, 100, 'All'],
showPaginationSwitch: true
});
"The data in the table is already loaded, it's just styling, paging and the properties that show me"
This is the
HTML
of my table "obviously has more data this is only for an idea "
<table id="datosTable" class="table table-striper table-bordered table-hover">
<thead>
<tr>
<td colspan="2">Lugar</td>
<td colspan="2">CHIN</td>
<td colspan="2">EUA</td>
<td colspan="2">MEX</td>
</tr>
<tr>
<td>Nombre</td>
<td>Nº</td>
<td>Peso.</td>
<td>%</td>
<td>Peso.</td>
<td>%</td><td>Peso.</td>
<td>%</td>
</tr>
</thead>
<tbody>
<tr>
<td>Acero </td>
<td>43a</td>
<td>0.47</td>
<td>6800</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</tbody>
</table>