gpt4 book ai didi

javascript - 未捕获的类型错误 : Cannot read property 'AutoFill' of undefined

转载 作者:行者123 更新时间:2023-12-01 05:48:33 24 4
gpt4 key购买 nike

我正在将 jquery datatables 1.10 与 ASP.NET 4.5 结合使用。代码在调试时没有任何问题。当我运行它时,它不会填充表中的数据并保留为空数据集。此错误出现在 FireBug 中。

代码:

        $('#dtGroups').dataTable({
"oLanguage": {
"sZeroRecords": "No records to display",
"sSearch": "Search "
},
"aLengthMenu": [[25, 50, 100, 150, 250, 500, -1], [25, 50, 100, 150, 250, 500, "All"]],
"iDisplayLength": 25,
"bSortClasses": false,
"bStateSave": false,
"bPaginate": true,
"bAutoWidth": false,
"bProcessing": true,
"bServerSide": true,
"bDestroy": true,
"bJQueryUI": false,
"sAjaxSource": "<%= ResolveUrl("~/Handler/GetData") %>",
"sPaginationType": "full_numbers",
"bDeferRender": true,
"fnServerParams": function (aoData) {

},
"aoColumnDefs": [
{
"bVisible": false,
"aTargets": [0]

},
{
"aTargets": [1],
"mData": null,
"mRender": function (data, type, row) {
var enc = encodeURI(row[1]);
return "<a href='SomePage.aspx?qs="+enc+"'>" + row[1] + "</a>";
}

}
],
"fnServerData": function (sSource, aoData, fnCallback) {
var jsonAOData = JSON.stringify(aoData);
$.ajax({
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"type": "POST",
"url": sSource,
"data": "{ jsonAOData : '" + jsonAOData + "' }",
"success":
function (result) {
var json = jQuery.parseJSON(result.d);
console.log(json);
fnCallback(JSON.parse(result.d))
},
"error":
function (XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest + ": Error: " + XMLHttpRequest.responseText + ", " + textStatus + ": " + errorThrown);
}
});
}
});

如有任何帮助,我们将不胜感激。

最佳答案

请阅读选项文档 http://datatables.net/reference/option/

另请阅读如何将选项转换为数据表 1.10。 https://datatables.net/upgrade/1.10-convert

fnServerData 不是数据表接受的选项。

关于javascript - 未捕获的类型错误 : Cannot read property 'AutoFill' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24495762/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com