7
VeriTavs.fixed javascript eklentisini kullanın ve verileri ajax ile doldurun. Şimdi, her bir veri sütununun genişliğinin dinamik olarak ve başlığın aynı statik genişlikte kalması sorunum var.JS dataTables.fixedHeader başlık ve veriler arasındaki farklı genişlik
Kodu:
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,
});
bunu doldurun:
$('#custTable').dataTable().fnAddData([
xyz, xyz, xyz, ...
]);
Eğer daha fazla kod sağlayabilir –