each page same data is showing and pagination and search is not working
each page same data is showing and pagination and search is not working
SandeepMurala
Posts: 48Questions: 13Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
I am using mongodb,I am pulling around 5k or 10k data from mongodb database.
if I use normal datatable concept it is taking longer time to load data,
so to reduce that I have done server side code like shown in below .
get_data.php file result shown in below .
Here total records count I have given
iTotalDisplayRecords:10
.total 10 pages are showing in pagination but each page has some date and each page contains 20records , for testing I have given 20 ,If I pull 4k records each page 4k records is showing and when go next page same data is reflecting .
In
display.php
file code is like this .Here data is displaying and not taking so much of time but pagenation is not working and search is also not working (I need to do individual column search also on the same table )
please help on it .
Thanks
Sandeep
It looks like your server-side script isn't complying with the expected protocol. The protocol is discussed here. Also see examples here. If you download the DataTables repo, there are examples of the server-side scripts in
/examples/server_side/scripts
,Cheers,
Colin
@colin ,Thanks for response .
Could you please explain little more ,I did not get you.
And I am using Mongodb datatable ,When I was using Mysql I have done properly , but now I am using Mongodb so Please help on it .
Or explain Any anther way we can do this server side script using Mongodb .
Thanks
Sandeep
Check the links I posted above, they'll explain what you need to do. Your server-side script needs to respond in a certain way to the client's requests - those responses are discussed in the links.
Colin