I need some help for Server side processing
I need some help for Server side processing
JRabii
Posts: 2Questions: 0Answers: 0
I'm using version 1.9.3 datatables with Symfony 2.1 to do an ajax call to retrieve records from my database.
I have 5000+ records.I want to show 100 per 100 page.
[code]
var url='{{ path('...............}) }}';
$(document).ready(function() {
$('#myTable').dataTable({
"sDom": "<'row-fluid'<'span4'l><'span8'f>r>t<'row-fluid'<'span4'i><'span8'p>>",
"sPaginationType": "bootstrap",
"bPaginate":true,
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tout"]],
"aaSorting" : [ [ 0, 'asc' ] ],
"bProcessing" : true,
"bServerSide": true,
"sAjaxSource" : url,
'iDisplayLength': 100,
"aoColumns": [
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
],
"oLanguage": {
"sProcessing": "Traitement en cours...",
"sSearch": "Recherche",
"sLengthMenu": "_MENU_ par page",
"sInfo": " _START_ / _END_ sur _TOTAL_",
"sInfoEmpty": "Aucun élément renseigné",
"sInfoFiltered": "(filtré de _MAX_ éléments au total)",
"sInfoPostFix": "",
"sLoadingRecords": "Chargement en cours...",
"sZeroRecords": "Aucun élément à afficher",
"sEmptyTable": "Aucune donnée disponible dans le tableau",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Précédent",
"sNext": "Suivant",
"sLast": "Dernier"
},
"oAria": {
"sSortAscending": ": Activer pour trier la colonne par ordre croissant",
"sSortDescending": ": Activer pour trier la colonne par ordre décroissant"
}
}
});
} );
[/code]
I have 5000+ records.I want to show 100 per 100 page.
[code]
var url='{{ path('...............}) }}';
$(document).ready(function() {
$('#myTable').dataTable({
"sDom": "<'row-fluid'<'span4'l><'span8'f>r>t<'row-fluid'<'span4'i><'span8'p>>",
"sPaginationType": "bootstrap",
"bPaginate":true,
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tout"]],
"aaSorting" : [ [ 0, 'asc' ] ],
"bProcessing" : true,
"bServerSide": true,
"sAjaxSource" : url,
'iDisplayLength': 100,
"aoColumns": [
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
],
"oLanguage": {
"sProcessing": "Traitement en cours...",
"sSearch": "Recherche",
"sLengthMenu": "_MENU_ par page",
"sInfo": " _START_ / _END_ sur _TOTAL_",
"sInfoEmpty": "Aucun élément renseigné",
"sInfoFiltered": "(filtré de _MAX_ éléments au total)",
"sInfoPostFix": "",
"sLoadingRecords": "Chargement en cours...",
"sZeroRecords": "Aucun élément à afficher",
"sEmptyTable": "Aucune donnée disponible dans le tableau",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Précédent",
"sNext": "Suivant",
"sLast": "Dernier"
},
"oAria": {
"sSortAscending": ": Activer pour trier la colonne par ordre croissant",
"sSortDescending": ": Activer pour trier la colonne par ordre décroissant"
}
}
});
} );
[/code]
This discussion has been closed.
Replies
Try instead:
var url='...............';
Allan