PHP AJAX Add Serial Number Column To Datatables
In this Video I will show php ajax add serial number column to datatables.
Datatables index column – https://datatables.net/examples/api/counter_columns.html
Add this –
“columnDefs”: [ {
“searchable”: false,
“orderable”: false,
“targets”: 0
} ],
“order”: [[ 1, ‘asc’ ]],
t.on( ‘order.dt search.dt’, function () {
t.column(0, {search:’applied’, order:’applied’}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
t.cell(cell).invalidate(‘dom’);
} );
} ).draw();
★★★ Thanks For Watching ★★★
★★★ Please like share and subscribe ★★★
Background Music –
Music: Nimbus by Eveningland
Video Link: https://youtu.be/ZOc84gXN-lg
Comments are closed.