asp.net-mvc-3 - TableSorter 记录过多

标签 asp.net-mvc-3 jquery pagination tablesorter

我已经在我的项目中实现了TableSorter。现在的问题是,在某些情况下我需要许多超过一千条记录。 TableSorter 插件通过 ajax 在客户端进行分页。我希望它进行服务器端分页+我想在单个页面上排序,而不是在整个数据上排序。即,如果 TableSorter 的单个页面上有 10 条记录,则必须在该单个页面上进行排序(仅针对这 10 条记录)。我无法更改为另一个表插件。我应该怎么办?我的数据来自模型。

最佳答案

对于pager ajax demo ,我必须手动更改 serverSideSorting 选项以使其对当前表内容进行排序。也许这对你也有用?尝试包含此代码:

$('table').bind('pagerInitialized', function(e, c){
    // allow current content sorting; this variable is automatically
    // set to true when ajax is initialized
    this.config.serverSideSorting = false;
});

关于asp.net-mvc-3 - TableSorter 记录过多,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14995575/

相关文章:

jquery - 如何在触摸设备上模拟悬停效果?

javascript - 如果太长,如何水平 chop 内联 ul 显示以适应屏幕宽度

javascript - 将第 3 方 JS 文件导入 Angular 组件

ios - 具有水平和垂直分页的 UICollectionViewLayout

asp.net-mvc-3 - 为什么 PayPal 忽略 discount_amount_cart?

c# - 路由映射不适用于 "area"

javascript - 使用 slider 为过滤添加分页,并在加载时显示过滤后的内容

mysql - Hibernate 相当于分页查询

performance - ASP.NET MVC3 Razor View - 在 VS2010 中编辑速度极慢

asp.net-mvc - 从 ASP.NET MVC 3 中的必需属性继承时,客户端验证不起作用?