CakePHP table sorting problem

Hello friends,
I am trying to sort the data in one table in view file by using Paginator component and helper. But the data in a table comes by filtering by using ajax, so when I click on sort link it sorts according to all the data in database table, I want to sort the data only present in a html table after filtering. Please guide on the same problem. Many thanks in advance.


I believe what you’re looking for is sorting on the client side, which has to be done via Javascript.

You can use a jQuery Plugin like this for this purpose:

1 Like

Thanks @ali , I had tried this, but I have custom filters on the page, when I use the filter then data table’s design breaks

Hi sahil-chadha,

@ali is correct this would need to be done using javascript. The CakePHP paginator component on the front end is simply a hyperlink in the form /controller/action/?soft-conditions. Javascript operations shouldn’t have any effect on this. Can you upload a code sample of what your doing to sort the html table?

Missing Database Table in cakephp so please help
i am learn cokephp .

Hi @yadavn205,

What exactly are you missing? Is this related to this current thread? If not please open a new one.

If your starting out I recommend completing the tutorial here

Have you resolved this issue ? I am also facing this issues, I have clear tmp/cache all folder, clear browser cache many times, created I thing new again again but could not solved, so tell me have you resolved this issues, My cakephp versionis 1.2.1