简体   繁体   English

带有客户端排序和过滤的jquery数据表中的服务器端分页

[英]Server side pagination in jquery datatable with client side sorting and filtering

Datatables requirements, is it possible? 数据表要​​求,有可能吗?

Example Scenario: 示例场景:

1. Server returns 10 rows at a time. 1.服务器一次返回10行。
2. Pagination is to be used 2.使用分页
3. Going back to a previous rendered page does not reload the data from the server 3.返回上一个呈现的页面不会从服务器重新加载数据
4. Sorting should be configurable enough to work on the already loaded data only and do not query the server for it 4.排序应该足够可配置,以仅对已加载的数据进行处理,而不要向服务器查询
5. Filtering should be configurable to work on client side data or query the server for it. 5.过滤应该是可配置的,以处理客户端数据或向服务器查询。

Is this set of requirements possible with jquery Datatables? jQuery Datatables可能有这组需求吗?

OK, the answer is this: if you use server-process to get data then when you do the sort, pagination and filter, it will always get data from server side, you have no chance to do it just in client side. 好的,答案是这样的:如果您使用服务器进程获取数据,那么当您进行排序,分页和过滤时,它将始终从服务器端获取数据,而您没有机会仅在客户端执行此操作。 When I used it first time, I had the same requirement, but finally I gave it up. 第一次使用时,我有相同的要求,但最终我放弃了。 in brief, if you choose server side, it will take care all of things with server side data. 简而言之,如果您选择服务器端,它将处理服务器端数据的所有事务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM