我已经在我的项目中实现了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/