7
Uso il plugin javascript dataTables.fixedHeader e riempio i dati con ajax. Ora ho il problema, che la larghezza di ogni colonna di dati è dinamicamente e l'intestazione rimane sulla stessa larghezza statica.JS dataTables.fixedHeader larghezza diversa tra intestazione e dati
Codice:
HTML:
<table class="table table-striped table-bordered table-hover" id="custTable">
<thead>
<tr>
<th>
......
</th>
<th>
......
</th>
<th>
......
</th>
......
</tr>
</thead>
<tbody id="dataList"></tbody>
</table>
JS:
table = $('#custTable').DataTable({
"dom": "frtiS",
"deferRender": true,
});
riempirlo:
$('#custTable').dataTable().fnAddData([
xyz, xyz, xyz, ...
]);
può fornire più di codice –