Tepken Vannkorn
Tepken Vannkorn

Reputation: 9723

jQuery Datatable filtering loads the default settings

I have a table created from jquery datatable which displays like above: enter image description here

like you see above, the current show entries status is 25 but it shows only 10 rows which is the default value. this is what I have called:

$(document).ready( function () {
    $('#example').dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",
        "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
    });
});

which the default one in its javascript library file is:

"aLengthMenu": [10, 25, 50, 100]

And I don't know where to edit it to load 25 rows at start up.

So any help would be very much appreciated.

Upvotes: 0

Views: 646

Answers (1)

Dhiraj
Dhiraj

Reputation: 33618

use iDisplayLength according to the docs

$('#example').dataTable({
    iDisplayLength: 25
});
​

DEMO

Hope this helps

Upvotes: 1

Related Questions