How do I send the pageNumber and pageSize to the server and retrieve data? 

How do I send the pageNumber and pageSize to the server and retrieve data? 

mercury15mercury15 Posts: 14Questions: 6Answers: 0
edited September 2022 in Free community support

Data total records : 113000 (It is not possible to load 100,000 records or more than that. It will be slow.)
Instead of loading the whole data, send pageNumber and pageSize to load data from the server.

First, get the total record count and the default load data (11300 page numbers, 10 records). Based on total record count, paging should be calculated as total records divided by page size —>113000/10 = 11300 pages (If pagesize is changed from 10 to 25, then 113000/25...). According to the calculation, the data table should contain 11,300 pages(Pagination).

Second, if I clicked on page number 50, it should send the 50th page number with pagesize(10) and load data from the server (dropdown index changed).

You are able to accomplish it. Kindly assist

$('#tblApplicantList').DataTable({
processing: true,
serverSide: true,
ajax: {
url: '?handler=LoadApplicantList?PageNumber=1&PageSize=10',
type: "get",
datatype: "json",
},

Answers

  • rf1234rf1234 Posts: 2,996Questions: 87Answers: 421

    Use Editor with server side and you don't have to worry about these things.

Sign In or Register to comment.