Data table -server side processing
Data table -server side processing

I am using Data table's Server side processing feature to process a huge set of data - load around 10000 records. I have done as per the example . But I am struggling with the server side logic.how do I dynamically send parameters to server side , to fetch the data. i see the parameter options, but I dont understand how to use them.Is there any example available how to send the parameters dynamically. e.g If I am clicking on Page 4 , how do I tell the server to fetch records from 40 to 50
Answers
The example works correctly, so you must have done something different.
Page 4 should show records 31-40.
Also, 10000 records is not a "huge" set of data for DataTables.
If you want to send customer parameters use
ajax.data
.See the documentation. If there is a particular part you would like to be explained, please say.
Allan
Hi Please check the below code. I am using Data Table1.8 version. now when I click on each page , a request goes to the server . what i am not understanding is when I click on page 2 , how do i send the record number to the server . currently in each fetch i am getting the same set of records. If I have 10000 records, should my query only return 10 records based on the page number or my query should return 10000 records, but data table will only show 10 records?
The parameters DataTables sends automatically will tell you that. See the legacy documentation here.
You would then use those parameters in your
FEList1.action
program to perform the required SQL actions (assuming you are using an SQL database) to get the data to display.Allan
Hi,
Is it possible to share a running example. I saw the link that you have shared. currently we have hardcoded iDisplayStart as 0 . are you saying , we need not hardcode this and data table will send this dynamically to the server side and in our server side we just need to do request.getParameter("iDisplayStart") . is this correct?
Live example using the current version of DataTables (it sends different parameters): https://datatables.net/examples/server_side/simple.html .
Allan