我在.NET MVC应用程序中使用DataTables 1.10.4。我收到了一个"请求的未知参数"引用任何嵌套数据时出错。我已经查看了datatables.net上的嵌套对象示例,我的代码看起来非常相似。
真的很感激任何帮助。
列DataTable属性:
"columns":
[
{"data": "OrgID"},
{ "data": "OrgName" },
{ "data": "Funds.FundCode"},
{ "data": "Funds.YtdBudget" },
{ "data": "Funds.YtdActivity" },
{ "data": "Funds.Encumbrance" },
{ "data": "Funds.AvailableBalance" }
]
JSON:
{
"data": [
{
"OrgID": "223906",
"OrgName": "CAS IT Operations",
"Funds": [
{
"FundCode": "001100",
"FundTitle": "",
"YtdBudget": 2468595,
"YtdActivity": 1505559.98,
"Encumbrance": 835310.34,
"AvailableBalance": 127724.68
}
],
"YtdBudget": 2468595,
"YtdActivity": 1505559.98,
"Encumbrance": 835310.34,
"AvailableBalance": 127724.68
}
],
"iTotalRecords": 1,
"iTotalDisplayRecords": 1
}
错误讯息:
DataTables warning: table id=ajaxTable = Requested unknown parameter 'Funds.FundCode for row 0.