I have been using Jquery datatable for many projects and it\'s working perfectly for all scenarios.
For my current project I require sorting to be happened only for
Before asking how to sort only current page we should answer following questions:
When we want to execute a query and display the result list we are dealing with:
These three elements are strongly related and they clearly define what user sees on the screen.
We can have for example following description:
There is a list of actors. It is sorted by name and divided into pages (50 items per page). And we are on the third page.
When we have such rules then user has good orientation in this list. He sees Michael Caine at the top and Shon Connery on the bottom of the page. When he wants to find Robert Duvall he knows he should go few pages further. And when he wants to see these actors sorted by age he simply resorts the lists and returns to first page.
But what if we provide additional sorting only for current page? This would disturb cohesion of above system. How would it sound if we say to user:
You are now seeing third page of sorted-by-name list of actors resorted (page) by age.
What can this user gain by resorting only current page? Age hierarchy of actors with name starting with 'C'? At the top of the page there will be the oldest actor from this page. But user doesn't know if it the oldest actor in all the list. And if not then on which page should he look for older one? Such resorting is worthless and it overrides initial sorting (which had some value).
Such resorting can also lead user to serious confusion. He can loose his orientation about original sorting and page sorting.
Conclusions:
I don't see any sense in providing sorting for single page. I find it harmful. So you should use it only if you have strong arguments for it.