Datatable Serverside pagination

Datatable Serverside pagination

ksgokhaleksgokhale Posts: 2Questions: 0Answers: 0

Hi,
I need to display only 100 records at a time. I get total number of records from the database, but have to display only first 100 records, after reaching 100 records. I should be able to get next 100 from the server.
Each time I execute the database query at the server side, I'm providing start and end rownum to get only 100 records at a time. Should be able to send the rownum values dynamically to get the records from the server.
Also I need to have the table column headers dynamically.

Any immediate help would be appreciated.

$("#searchTableDiv").append('

');
var tableClient = $("#dynaTdaTable").DataTable({
"ajax": {
"type": formObj.attr('method'),
"url": formObj.attr('action'),
"dataType" : 'json',
"data": function(d){
return formData;
},
'dataSrc': function(data){
return data.dataSet;
},
complete:function(){
$('#loadingDiv').hide();
}
},
'columns': [
{'data': 'data.first_name'}
],
"Processing": true,
"ServerSide" : true,
"paging": true,
"recordsTotal": 57
});

Replies

This discussion has been closed.