Quantcast
Viewing all articles
Browse latest Browse all 82127

I need some help for Server side processing

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.

 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 &eacute;l&eacute;ment renseign&eacute;",
            "sInfoFiltered":   "(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)",
            "sInfoPostFix":    "",
            "sLoadingRecords": "Chargement en cours...",
            "sZeroRecords":    "Aucun &eacute;l&eacute;ment &agrave; afficher",
            "sEmptyTable":     "Aucune donn&eacute;e disponible dans le tableau",
            "oPaginate": {
                "sFirst":      "Premier",
                "sPrevious":   "Pr&eacute;c&eacute;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"
            }
        }
    });
} );


Viewing all articles
Browse latest Browse all 82127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>