Trouble with _END_ when showing All
Trouble with _END_ when showing All
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
Here is a SSP example showing all rows:
http://live.datatables.net/wegexino/1/edit
The display is correct. The server script responds with the number of records. Sounds like your server script is not populating the
recordsFiltered
reponse parameter correctly. More info here:https://datatables.net/manual/server-side#Returned-data
Kevin