paginate doesn´t work

paginate doesn´t work

sjkurrosjkurro Posts: 6Questions: 0Answers: 0
edited October 2011 in General
Hi, the pagination of the datatable doesn´t work, how can i fix it??

$(document).ready(function() {
oTable =$('#resultMTC').dataTable( {
"bProcessing": true,
"bServerSide": true,
"oSearch": {"sSearch": '<?php echo $vars['sSearch']; ?>'},
"sAjaxSource": "<?php echo $vars['url']; ?>pg/groups/searcher",
"bLengthChange": false,
"bAutoWidth": false,
"iDisplayLength": 15,
"oLanguage": {
"sSearch": "Filtra aquí tus resultados",
"sZeroRecords": "Nadie lo ha pedido todavia...sé el primero!!!",
"sInfo": "Mostrando _START_ a _END_ de _TOTAL_ conciertos",
"sInfoEmpty": "Mostrando 0 a 0 de 0 conciertos",
"sInfoFiltered":""
},
"fnServerData": function ( sSource, aoData, fnCallback ) {
/* Add some extra data to the sender */
aoData.push( { "name": "provincia", "value": $("#provincias").val() } );
aoData.push( { "name": "localidad", "value": $("#localidades").val() } );
aoData.push( { "name": "artista", "value": $("#artista").val() } );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
} );},
"aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] }
]
});
$('#resultMTC_processing').css('padding','0');
$('#resultMTC_processing').html("");
} );

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    What does your JSON return look like? My guess would be that iDisplayRecords is 15 rather than the count of the full data set. See the documentation here for more information: http://datatables.net/usage/server-side

    Allan
This discussion has been closed.