$('#datatable').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "../../WebPost/AjaxPinToFolderSearch",
"data": function (d) {
d.postID = globalPinToFolderSearchID;
},
"columns": [
{ "data": "Folder", "defaultContent": "Value Not Received" },
{ "data": "Pinned", "defaultContent": "Value Not Received" },
{ "data": "StartDate", "defaultContent": "Value Not Received" },
{ "data": "EndDate", "defaultContent": "Value Not Received" }
]
}
});
示例响应(来自开发人员工具“网络响应”):
{"data":[{"Folder":"Home/Test One/Frogger","Pinned":false,"StartDate":"\/Date(18000000)\/","EndDate":"\/Date(18000000)\/"}]}
数据表似乎正在正常工作,因为它正在请求和接收数据。弹出错误,表格显示空白行(响应-表格中1行数据= 1行)。我意识到这是一个普遍的问题,但是我无法弄清楚出什么问题了。注意,后端是C#。