Trouble with _END_ when showing All

Trouble with _END_ when showing All

jquijadojquijado Posts: 24Questions: 6Answers: 0

I've built a DT with the lengthMenu option set as follows:

lengthMenu: [[10, 15, 20, -1], [10, 15, 20, 'All']],

If I select a number option it works properly. If I select the All option, the table shows all the records (which is correct) but in the message at the bottom it says;

Showing 1 to 0 from 24 records

It should say:

Showing 1 to 24 from 24 records

It's only when I select the All option that the END value doesn't get the right number. If I select any other option it works properly.

Of course, in the server side script the query is modified so when the All option is selected no LIMIT clause is used.

Where does DT get the END value from? How can I fix this?

Thanks everyone.

Answers

This discussion has been closed.