hi, i'm still new for this kind things, i wish someone can give me some advice
i use deferender for load 10.000 more data to data table, and i have numbering row to.
but the number only show in paging 1 and 2, and the rest has [Object] in column number. are there any other way beside deferender for load more than 10.000 data faster and still can get number row ? or what should i do if still can using deferender and fix numbering in column number for numbering row?
here is the code i used for numbering and deferender data,
$(document).ready(function () {
//datatable
$('#tbKon').DataTable();
//setting index number datatable
$('#tbKon').DataTable().on('order.dt search.dt', function () {
$('#tbKon').DataTable().column(0, { search: 'applied', order: 'applied' }).nodes().each(function (cell, i) {
cell.innerHTML = i + 1;
});
}).draw();
});
$('#tbKon').DataTable({
data: mdl,
columns: [
{ "data": null },
{
"data": null,
"render": function (data, type, row, meta) {
if (type === 'display') {
data = '<a href="/Kondisi/Update?Id=' + data.CodeKon + '"><i class="fas fa-edit" style="font- size:50px"></i></a>';
}
return data;
}
},
{ "data": "CodeKon" },
{ "data": "NameKon" },
{ "data": "Status" }
],
"responsive": true,
"autoWidth": true,
"scrollY": 300,
"scrollX": true,
"bDeferRender": true,
"columnDefs": [
{
"targets": [1],
"width": 25,
"className": "text-center",
},
]
});