Get the number of entries (aLengthMEnu) when it change

Get the number of entries (aLengthMEnu) when it change

AzaretAzaret Posts: 17Questions: 2Answers: 0
edited March 2012 in General
Hi,

I would to know how to get the number of entries selected, into the lenght menu, when it change.
Basically, I would to get it on fnDrawCallback for save which one have been selected.
On oSettings, aLengthMenu is just the list, and _iDisplayLength never change.

So, how can I get this info ?

Regards,

Replies

  • John ArcherJohn Archer Posts: 56Questions: 1Answers: 0
    Hi!

    If I understand you right you want to save (to a file/DB!?) which option is selected!? If so, you can use the fnStateSave callback. This takes two parameters (see the docs), where the second one is e.g. oData. Within oData you can see the field iLength which has the current selected length option.

    Hope it helps!
  • AzaretAzaret Posts: 17Questions: 2Answers: 0
    That look to be what I was looking for, thank you very much.
    Have a nice day.
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    You might also be interested in this plug-in to get information about the paging state from DataTables: http://datatables.net/plug-ins/api#fnPagingInfo

    Allan
This discussion has been closed.