Why my datatables serverside only have 1 page?

Why my datatables serverside only have 1 page?

jeraldpunxbot1jeraldpunxbot1 Posts: 4Questions: 1Answers: 0
edited December 2015 in Free community support

I have 14 in records and 10 display, IDK why I have only page 1

this is my request

all_phone_numbers.php?sEcho=1&iColumns=2&sColumns=%2C&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=false&bSortable_1=false&sSearch=&bRegex=false&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&_=1449688020141

then the result of JSON is this

{"sEcho":1,"iTotalRecords":"14","iTotalDisplayRecords":10,"aaData":[["13863202227",""],["13864790508",""],["13865174009",""],["14073308841",""],["14073884953",""],["14074500122",""],["14075625408",""],["14076177154",""],["14076688983",""],["14077068252",""]]}

then my datatables init

<table id="pn" class="display" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>Phone Numbers</th>
                    <th>Controls</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>

$('#pn').DataTable({
            "order": [[ 0, "asc" ]],
            "columnDefs": [
              { "searchable": false, "orderable": false, "width": "20%", "targets": 1 },
            ],
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "ajax_files/all_phone_numbers.php",
            "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
                $('td:eq(1)', nRow).html('<a href="#" class="btn btn-danger btn-xs remove" data-id=' + aData[0] + '><span class="fa fa-remove"></span> Remove</a>');
            }
        });

and this is the image display: http://i.stack.imgur.com/ZUlD0.png

Answers

This discussion has been closed.