https://datatables.net/examples/server_side/simple.html

當頁面上要顯示的數據在10萬筆以上時,可以使用server-side processing. 這樣在change entries, paging, sorting的時候,會通過事先定義好的ajax去backend重新取得數

RadGridTable = $('#tbNKeywords')
.on( 'processing.dt', function ( e, settings, processing ) {
// paging or sorting .etc processing or not,
// processing will be true if processing finished.
$('#loading_overlay').css( 'display', processing ? 'block' : 'none' );
})
.on('xhr.dt', function ( e, settings, json, xhr ) {
// Ajax call back, add some code here...
if (json == null || json["success"] == false) {
$('#loading_overlay').css( 'display', 'none' );
}
})
.on( 'draw.dt', function () {
// check all rows if select-all checked
if($(".select-all").is(":checked")) {
CheckedAll = 1;
RadGridTable.rows().select();
} // reset select checkbox by saved selected row ids
RadGridTable.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
if (AllSelectedRowIds.includes(this.id()))
this.select();
} );
})
.on( 'page.dt', function () {
if (CheckedAll == 1)
return; // save selected row id when paging
var selectedRowIds = RadGridTable.rows( { selected: true } ).ids();
for (i = 0; i < selectedRowIds.count(); i++)
{
if (!AllSelectedRowIds.includes(selectedRowIds[i]))
AllSelectedRowIds.push(selectedRowIds[i]);
}
})
.on( 'click', 'tbody tr', function () {
if (CheckedAll == 1)
return false;
})
.DataTable({
"columns": [
{ "data": null },
{ "data": "Created_Date" },
{ "data": "xxxxxxxx" },
{ "data": "xxxxxxxx" },
{ "data": "xxxxxxxx" },
{ "data": "xxxxxxx" },
{ "data": "xxxxxxx" }
],
columnDefs: [{
orderable: false,
className: 'select-checkbox',
targets: 0,
data: null,
defaultContent: ''
}],
select: {
style: 'multi',
selector: 'td:first-child'
},
order: [[ 1, 'desc' ]],
"paging": true,
"searching": false,
colReorder: false,
fixedHeader: true,
"processing": true,
"serverSide": true,
rowId: 'KeywordId',
     "language": {
"infoFiltered": "" // remove "(filtered from x total entries)" part from datatable footer information.
},
"dom": '<"top"flp<"clear">>rt<"bottom"ip<"clear">>',
"ajax": {
"url": "/common/service/xxxxxxxxHandler.ashx",
"type": "POST",
"data": function (d) {
d.action = "xxxxxxxxx";
d.data = JSON.stringify(xxxxxxx);
d.Id = <%=Id%>;
}
}
});

define dataTable頁面上的一些文字部分

https://datatables.net/reference/option/language

例如: 不想要顯示 "(filtered from x total entries)" 在 footer的部分

$(document).ready(function() {
$('#example').DataTable( {
"language": {
"infoFiltered": ""
}
} );
} );

DataTable.NET 使用server-side processing的更多相关文章

  1. 解决方法:An error occurred on the server when processing the URL. Please contact the system administrator

    在WINDOWS7或SERVER2008上安装了IIS7.5,调试ASP程序时出现以下错误: An error occurred on the server when processing the U ...

  2. 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法

    相信用过IIS7的朋友在调试程序的时候都遇到过下面这样的错误提示:    An error occurred on the server when processing the URL. Please ...

  3. asp IIS部署An error occurred on the server when processing the URL错误提示解决

    An error occurred on the server when processing the URL. Please contact the system administrator.If ...

  4. 解决IIS7中出现An error occurred on the server when processing the URL错误提示的方法

    在IIS7上配置一个asp程序,出现了一个错如提示: An error occurred on the server when processing the URL. Please contact t ...

  5. 解决IIS7运行ASP提示错误:An error occurred on the server when processing the URL. Please contact the system administrator

    原文:解决IIS7运行ASP提示错误:An error occurred on the server when processing the URL. Please contact the syste ...

  6. iis7错误提示An error occurred on the server when processing the URL...

    win7下面运行ASP程序总是出错,原来是站点配置的问题... 问题一:MS Jet引擎改变了临时目录的位置,但是又没有对临时目录的存取权限,导致数据库使用失败(因为sql问题,后改用access数据 ...

  7. IIs 中运行asp程序出现“An error occurred on the server when processing the URL. Please contact the system administrator.”错误

    在个人的win08系统上使用IIs运行 asp程序结果出现了以下错误 An error occurred on the server when processing the URL. Please c ...

  8. 解决Windows server 2012 R2 系统使用IIS8浏览Asp程序出现"An error occurred on the server when processing the URL"错误

    进入IIS并将ASP里的“Send Error To Browser”设置为True后点击Appley保存即可 原因是IIS里的Asp设置禁用上当错误信息发送给浏览器,只要启用即可 如果没有Asp选项 ...

  9. 打开asp出现An error occurred on the server when processing the URL

    分享到:   2013-01-21 15:38   提问者采纳   方法一 以管理员身份运行CMD,将目录定位到%windir%\system32\inetsrv\,然后执行appcmd set co ...

  10. Win7/8出现An error occurred on the server when processing the URL解决办法

    使用的是win8系统搭建的本地服务器,win7使用的方法是相同的.如果你的系统是精简版的Win7/8,那么安装IIS7也有可能出现这问题.下面SJY带领大家来解决这个错误. 解决方法 打开控制面板→管 ...

随机推荐

  1. PostgreSQL 抛出错误信息(错误行号)

    抛出错误行号是我们在写SQL中常用到的,在SQL Server和Oracle中都很简单,但是在PostgreSQL怎么实现呢?在网上查了下资料只有pg_exception_context包含错误行,我 ...

  2. 015——C#软件出现《未在本地计算机上注册"Microsoft.Jet.OLEDB.4.0"》

    (一)参考文献:https://zhidao.baidu.com/question/361243661437448812.html https://blog.csdn.net/yyx3214/arti ...

  3. bzoj 1072: [SCOI2007]排列perm 状压dp

    code: #include <bits/stdc++.h> #define N 1005 using namespace std; void setIO(string s) { stri ...

  4. Base64原理解析与使用

    一.Base64编码由来 为什么会有Base64编码呢?因为有些网络传送渠道并不支持所有的字节,例如传统的邮件只支持可见字符的传送,像ASCII码的控制字符就 不能通过邮件传送.这样用途就受到了很大的 ...

  5. 通过django-crontab扩展来实现 定时任务

    pip install django-crontab 基本格式 : * * * * * 分 时 日 月 周 命令 M: 分钟(0-59).每分钟用*或者 */1表示 H:小时(0-23).(0表示0点 ...

  6. Pycharm使用技巧:Split Vertically/Horizontally(垂直/水平拆分窗口)

    Split Vertically或者Split Horizontally可以把当前编辑窗口垂直或者水平拆分成两个. 使用: 在编辑窗口中打开你要展示的两个文件(如图中的  "郭靖" ...

  7. 《挑战30天C++入门极限》C/C++中结构体(struct)知识点强化

        C/C++中结构体(struct)知识点强化 在上一个教程中我们已经简单的阐述了什么是结构体了,为了进一部的学习结构体这一重要的知识点,我们今天来学习一下链表结构. 结构体可以看做是一种自定义 ...

  8. manjaro (arch) 安装搜狗输入法

    本文通过MetaWeblog自动发布,原文及更新链接:https://extendswind.top/posts/technical/sogou_input_install_in_arch_manja ...

  9. Linux----添加zabbix-agent

    1.zabbxi-agent安装及配置 1.1 获取官方zabbix源 [root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/r ...

  10. PostgreSQL学习笔记(九) 用户、角色、权限管理

    PostgreSQL是一个多用户数据库,可以为不同用户指定允许的权限. 角色PostgreSQL使用角色的概念管理数据库访问权限. 根据角色自身的设置不同,一个角色可以看做是一个数据库用户,或者一组数 ...