I need some help for Server side processing

I need some help for Server side processing

JRabiiJRabii Posts: 2Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
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]

Replies

  • psharppsharp Posts: 39Questions: 0Answers: 0
    Your URL might be malformed .

    Try instead:
    var url='...............';
  • JRabiiJRabii Posts: 2Questions: 0Answers: 0
    No,var url='{{ path('name',{ 'id': id}) }}'
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Link to a test case please: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read .

    Allan
This discussion has been closed.