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. 常见的meta标签属性

    meta标签是网页元标签.可以定义一些网站的功能. 1. name属性 name属性的通用格式如下: <meta name="xxx" content="xxxx, ...

  2. Qt智能指针QPointer, QSharedDataPointer ,QSharedPointer,QWeakPointer和QScopedPointer

    QPointer (4.0) 已经过时,可以被QWeakPointer所替代,它不是线程安全的. QSharedDataPointer (4.0) -- 提供对数据的COPY-ON-WRITE以及浅拷 ...

  3. BZOJ 2333: [SCOI2011]棘手的操作

    题目描述 真的是个很棘手的操作.. 注意每删除一个点,就需要clear一次. #include<complex> #include<cstdio> using namespac ...

  4. A Comprehensive Evaluation of Approaches for Built-Up Area Extraction from Landsat OLI Images Using Massive Samples(landsat8建城区提取不同方法比较)

    感觉主要是数据的创新,方法就是比较了传统方法(RF,SVM,Adaboost)和CNN,输入比较了单像素输入和像素周围3,5,7大小的范围.也不是语义分割,最基本的CNN,单像素时还用的1*1的卷积 ...

  5. Promethues实战-简易教程系列

    1.监控概述 2.Promethues基础 3.Promethues初体验

  6. ubuntu之路——day10.6 如何理解人类表现和超过人类表现

    从某种角度来说,已知的人类最佳表现其实可以被当做贝叶斯最优错误,对于医学图像分类可以参见下图中的例子. 那么如何理解超过人类表现,在哪些领域机器已经做到了超越人类呢?

  7. POJ1177和POJ1389 。。。

    POJ 1177 Picture 经典线段树+离散化+扫描线 POJ 1177 Picture (线段树+离散化+扫描线) 详解 线段树(segment tree) http://www.java3z ...

  8. 范仁义html+css课程---2、html常用标签

    范仁义html+css课程---2.html常用标签 一.总结 一句话总结: html常用的标签有 标题标签.div.span.p.hr.br标签 等 1.html中的标题标签有哪些? <h1& ...

  9. html5中 input的pattern属性 和 details/summary元素

    html5--3.21 课程小结与其他新增元素 一.总结 一句话总结: input的pattern属性可以设置正则验证,比如检测学号的位数和数字区间 details/summary元素配合起来可以做元 ...

  10. Spark(四十六):Spark 内存管理之—OFF_HEAP

    存储级别简介 Spark中RDD提供了多种存储级别,除去使用内存,磁盘等,还有一种是OFF_HEAP,称之为 使用JVM堆外内存 https://github.com/apache/spark/blo ...