How do I access iDisplayLength value

How do I access iDisplayLength value

ed123ed123 Posts: 1Questions: 0Answers: 0
edited July 2013 in General
Hi,
I would like to get the iDisplayLength value when navigating away from a page in order to save the user's last used value in order to use as their default next time a page with a datatable on loads.

Please could someone help me with the syntax for obtaining the iDisplayLength value. So far I have:

$(window).unload(function () {
oTable = $('#tblTasks').dataTable();
var oSettings = oTable.fnSettings();
alert(oSettings.iDisplayStart);
})

Thanks

Replies

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    Currently you can use the fnPagingInfo plug-in: http://datatables.net/plug-ins/api#fnPagingInfo .

    Something similar with be available built into 1.10.

    Allan
This discussion has been closed.