Manual server side processing
Manual server side processing
bhushanpatil
Posts: 17Questions: 4Answers: 0
Problem statement
i want to load only 40 records per page,so on click of next button on the basis of (x flag which is true/false) i need to call another 40 records.
How this is possible
How to send and retrieve data using server side processing
please suggest with detailed example,as the example given on the site not have enough information.
This discussion has been closed.
Answers
If you are referring to this example
https://datatables.net/examples/data_sources/server_side.html
what information do you think is missing?
Thanks for reply @tangerine
On next button of pagination want to call next 40 records,which depends of some flag
so how to do that?
and also where do we get ajax response in success?dataFilter?
and how to set that response to the datatable.
Are you saying that the flag is some sort of filter or it determines whether the next page should be fetched?
Please describe in more detail what you are trying to do.
Kevin
Thanks for reply @kthorngren
Are you saying that the flag is some sort of filter or it determines whether the next page should be fetched? --Yes
Most of the example given on forum having a fixed data,in my case dont know how many records are there its totally depends of flag call isMoreRecords which tells is records available,according to that we fetch next record.
Also want to send some data in ajax request while fetching next records
Unfortunately DataTables doesn't not have the ability to use server-side processing in such a mode at the moment. It always requires that the number of rows in the data set be known.
Allan
Thanks @allan for reply
If we want to achieve manually on click of next button,then is it possible?
Thanks @allan for reply
i mean to say in every call i get 40 records only,to get next 40 records i have to check the flag and respective of that fetch the next records
is it really not possible??
Externally you could use
clear()
to clear the old data and thenrows.add()
to add your new data. But that wouldn't be possible with DataTables' built in paging control, which fundamentally requires to know how many rows are in the record set.Allan