Paging on Server Side processing not highlighted/working
Paging on Server Side processing not highlighted/working
polariman
Posts: 6Questions: 2Answers: 0
Can't figure out why the paging is not working on server side processing? Table displays and operates fine but paging not working. Debugger code: urogex
var projects_table = $('#projects_table').DataTable({
"sDom": '<"top"lpf>rt<"bottom"ip><"clear">',
"jQueryUI":true,
"processing": true,
"serverSide": true,
"ajax": {
"url":"ajax/data_table_proj.php",
"data": function(d){
d.tenant_id = tenant_id;
d.userid = userid;
}
},
"pageLength":<? echo $listnum;?>,
"columnDefs":[
{"targets":0,className:"tablepick"},
{"targets":1,className:"tablepick"},
{"targets":2,className:"tablepick"},
{"targets":3,className:"tablepick"},
{"targets":4,className:"tablepick"},
{"targets":5,className:"tablepick"},
{"targets":6,className:"tablepick"},
{"targets":7,className:"tablepick"},
{"targets":8,"type":"date",className:"tablepick"},
{"targets":9,"visible":false},
{"targets":10,"visible":false},
],
"createdRow":function(row,data,index){
$('td', row).eq(0).html("<span style=\"float:left;\" class=\"plusminus pick ui-icon ui-icon-plusthick\"></span>");
switch(data[1]){
case '1':$('td', row).eq(1).html("<img src=\"images/pins/gdot_008000.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '2':$('td', row).eq(1).html("<img src=\"images/pins/gdot_ADFF2F.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '3':$('td', row).eq(1).html("<img src=\"images/pins/gdot_FFFFCC.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '4':$('td', row).eq(1).html("<img src=\"images/pins/gdot_996633.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '6':$('td', row).eq(1).html("<img src=\"images/pins/gdot_FFFF00.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '7':$('td', row).eq(1).html("<img src=\"images/pins/gdot_00FFFF.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '8':$('td', row).eq(1).html("<img src=\"images/pins/gdot_0000FF.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '9':$('td', row).eq(1).html("<img src=\"images/pins/gdot_9400D3.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '10':$('td', row).eq(1).html("<img src=\"images/pins/gdot_FF0000.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '11':$('td', row).eq(1).html("<img src=\"images/pins/gdot_FF69B4.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '12':$('td', row).eq(1).html("<img src=\"images/pins/gdot_FFFFFF.png\" width=\"16\" height=\"16\" border=\"0\">");break;
case '13':$('td', row).eq(1).html("<img src=\"images/pins/gdot_000000.png\" width=\"16\" height=\"16\" border=\"0\">");break;
}
},
"order":[[<? echo $sortc;?>, '<? echo $sort;?>']]
});
This discussion has been closed.
Replies
Hi,
Thanks for the debug trace. It shows that the result set has only 11 records (after filtering) but the display length is 100 records. Therefore all records should be shown on the page and there should be no second page available.
Allan
The issue was with my SELECT SQL_CALC_FOUND_ROWS.