0

I used a datatable to display records which i fetch from DB, now i have to customize it so that a new DB call is made to fetch the next 10 records from DB (Server side) on click of Next button provided by datatable.

Does anyone have any idea about this?

Thanks.

user3751955
  • 45
  • 1
  • 5

2 Answers2

0

I never tried this but I think you can assign a var in jquery which gets increased by 10 whenever the Ajax call is success and fetches Data from DB. Send this var to the called function by Ajax and accordingly you can create SQL statement with rownum value as this var of jQuery.

Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104
0

You may use fnDrawCallback or fnInfoCallback to detect changes, when next is clicked both of them are fired.

But beware,page changes are not the only source that can fire those callbacks.

Detect page change on DataTable

Community
  • 1
  • 1
usama
  • 31
  • 4