Length value for datatables

Length value for datatables

trupsstertrupsster Posts: 4Questions: 0Answers: 0
edited April 2011 in General
Hello all,

I am using datatables to display a results that I retrieve from a database. How can I include the total number of entries as an option in the drop down that says 'Show [10,25,50,100] entries'?

Basically, I'd like the drop-down to also include 'All', as in
[code]
Show [10,25,50,100,All]
[/code]
and if user chooses All, show all the results at once.

Any help would be greatly appreciated.

Thanks!

Trupti

Replies

  • rubycatrubycat Posts: 9Questions: 0Answers: 0
    I'm doing this also...is pretty easy. More information and sample here:
    http://www.datatables.net/examples/advanced_init/length_menu.html

    Would be something along the lines of:
    [code]"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]][/code]
  • trupsstertrupsster Posts: 4Questions: 0Answers: 0
    Just what I wanted! Perfect! Thanks :)
This discussion has been closed.