cakephpdatatablepaginationrichdatatable

Data Tables to load limited data on page load first time and get more data by ajax if required


i'm looking suggestion based answer as I'm doing work with data tales in cakephp to display my data. corrently i'm using datatables to display data. but the issue is all data load on first load of page, i'm supposing if data is too much in database like 100,000 records then it will create issue because it will take long time to load in view(I suppose it is not a good approach). I wanna load 100 record first time then on click next more data should be.

Problem 2 I looked cakephp plugin it is nice but only to load data for same model and controller. If I load model "A" in controller "B" , then it does not work to display model "A" data, it keep search for model "B".

I know one is pagination option to load limited data, but i'm looking for data tables, if it exist.


Solution

  • I know one is pagination option to load limited data, but i'm looking for data tables, if it exist.

    Are you sure your know what you're doing? Datatables is just a script that uses client side pagination through a script that gets data from a datasource. That script can get it's data through many sources, one is AJAX. What you want is in fact pagination:

    Basic concept: The Datatables script makes an AJAX call, the server side returns the paginated data as JSON and the Datatables script will process it. Read the manuals.