我使用以下代码用数据表填充数据。
<html>
<code>
<script>
var table;
var gaiSelected = [];
$(document).ready(function() {
$(".datepicker").datepicker({
dateFormat : 'dd/mm/yy'
});
$("#uploadIdListTable").dataTable({
"bJQueryUI": true
});
$('#submitDateButton').click(function() {
var fromDate=$('#fromdateID').val();
var toDate=$('#todateID').val();
console.log("todate"+toDate);
console.log("fromDate"+fromDate);
table = $("#uploadIdListTable").dataTable({
"bDestroy": true,
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sAjaxSource": '/admin/SearchCriteria',
"sServerMethod": "POST",
"aoColumns": [
{ "mDataProp": "uploadId" ,"sWidth": "20%"},
{ "mDataProp": "vendorName","sWidth": "10%"},
{ "mDataProp": "vendorFeedMedium","sWidth": "10%" },
{ "mDataProp": "state","sWidth": "20%"},
{ "mDataProp": "filename","sWidth": "30%"},
{
"mDataProp": "vendorId",
"sTitle": "Status Url",
"fnRender": function (o) {
return '<a href="/admin/uidStatusViewer?uploadId=' + o.aData.uploadId + '">GetStatus </a>';
}
}
],
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "fromDate", "value": fromDate } );
aoData.push( { "name": "toDate", "value": toDate } );
}
});
$('#uploadIdListTable tbody tr').live('dblclick', function () {
var aData = table.fnGetData( this,0 );
alert(aData);
});
});
});
</script>
</code>
</html>
问题是,如果我使用serach它会命中服务器并尝试再次获取数据。但我希望搜索到填充数据的本地。
数据表中是否有可用的参数来实现此目的?