Javascript – DataTable not showing pagination buttons and records info – JQuery


Using Datatable plugin for pagination, I can't get it to display pagination buttons and records information ("Showing X out of Y Records"). It is fetching the records correctly when I am selecting the page size from the drop down just above the table, but for some reason, it is not showing pagination buttons.

My guess is that it has to know the Total Record count of the table, and I am giving it that in the ""iTotalRecords": 10000" part, I have 1000 records in my table, but still it is of no use. What exactly am I missing here?

It is passing the start (page number) and length (page size) params correctly.
Below is my code,

        "processing": true,
        "serverSide": true,
        "info": true,
        "stateSave": true,
        "lengthMenu": [[10, 50, 100, 500], [10, 50, 100, 500]],
        "iTotalRecords": 10000,
        "iDisplayLength": 10,
        "searching": false,
        "scrollY": false,
        "scrollX": false,
            type: 'POST',
            url: '@Url.Action("SearchLeads", "ResourceManagement")',
            data: args,
            success: function (result) {
                /* Do things with result */


Best Solution

Have you tried adding following parameters:

 "bLengthChange": true,
 "bInfo" : true
Related Question