aLengthMenu in 1.9

aLengthMenu in 1.9

sparhsparh Posts: 11Questions: 2Answers: 0

Hello,
I am using dataTable 1.9.1 and I can not upgrade it.
I Try to use pagination and to load only 100 first lines on load.
Can you tell me how to do it, here is my code :

var oTable = $('#tableHisto').dataTable({
"sAjaxSource": "plannings.php?id_technicien=<?php echo $id_technicien ;?>&type=data",
"aaSorting": [[0,'desc']],
"iDisplayStart": 100,
"aLengthMenu": [ [100, 200, 500, -1], [100, 200, 500, "Toutes"] ]
});

thank you ?

Answers

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin

    If you only want the records for the first page to be loaded, you need to use server-side processing. There is a description on server-side processing here.

    Documentation for the legacy server-side processing parameters (keep in mind that 1.9 is no longer supported) is available here.

    Allan

  • rf1234rf1234 Posts: 2,808Questions: 85Answers: 406

    As far as I know this isn't possible. I had a similar issue and built my own filter for the where clause of Editor to reduce the number of rows returned. If you are not using Editor you can limit the number of rows using the SQL LIMIT clause in your custom query.

  • rf1234rf1234 Posts: 2,808Questions: 85Answers: 406

    ok, fine! then my issue was I didn't get server-side processing working ... anyway ...

  • sparhsparh Posts: 11Questions: 2Answers: 0

    Thanks for the help
    Actually I was searching for the bpaginate option

This discussion has been closed.