Datatable pagination with Ajax-JSON functionality

Datatable pagination with Ajax-JSON functionality

akshaykakabaliaakshaykakabalia Posts: 1Questions: 0Answers: 0
edited June 2013 in DataTables 1.9
hi,
I am using bootstrap. I want to use datatable for display the data. I also want to export/save/print functionality for that. My data is approx. 3000 no. of records. so i can't go with load the all records at one time. because it takes so much time... So i want to use pagination with ajax functionality. I made the Json array of all records and display in datatable. The issue is that if the pagination works, the export and search functionality doesn't work... so what i have to do to fulfill my all functionality.....?
I am doing the project in PHP and i want to do simple CRUD operations on data....


please HELP

Replies

  • fcaceresfcaceres Posts: 5Questions: 0Answers: 0
    Good Question! I am wondering about that myself, imo I don't see any other option than create a pagination query to query the database every time and get the resulting pages in newely generated JSON data every time limiting to a page size data. but I think it would save time to include (somehow) pagination within JSON, but I don't see how that could be possible. small queries to the database should generate JSON quick enough.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You've got two basic options:

    1. Client-side processing when all data is loaded to the client up front.
    2. Server-side processing when only the data needed for each draw is retrieved when each draw occurs.

    TableTools export is obviously client-side, so mixing TableTools export with server-side processing, imho, is fairly pointless since it would need a full data load.

    Allan
This discussion has been closed.