dategrid和iDategrid的问题 这个情况算是bug吗

提问 未结 3 3929
Timmy 4年前
悬赏:20飞吻
我有一个页面加载,代码是这样的
<table id="ApproveList"></table>

<script type="text/javascript">
$(function () {
$('#ApproveList').iDatagrid({
url: '@Url.Action("ApproveRecord")?id=' + '@ViewBag.PlanCode',
methord: 'post',
fitColumns: true,
pagination: false,
striped: true, //奇偶行是否区分
singleSelect: true,
columns: [[
{ field: 'EmployeeName', title: '审核人', width: 80, halign: 'center' },
{
field: 'DoDate', title: '审核日期', width: 50, align: 'center',
formatter: function (value) {
return DataFormatter(new Date(value.replace(/-/, "/")));
}
},
{ field: 'IsPass', title: '是否通过', width: 40, halign: 'center' },
{ field: 'Opinion', title: '审核意见', width: 40, halign: 'center' },
{ field: 'FormCode', title: 'FormCode', width: 50, hidden: true },
{ field: 'EmployeeID', title: 'EmployeeID', width: 40, hidden: true },
{ field: 'ActivityName', title: 'ActivityName', width: 40, hidden: true }
]]
});
});
</script>
现在这种情况的话打开页面后,数据加载过来了,但是表格里却显示不出来数据,表格是空的,但是如果将iDategrid 换成 datagrid 数据就显示出来了,这是什么情况啊,更换完的代码是这样的

<table id="ApproveList"></table>

<script type="text/javascript">
$(function () {
$('#ApproveList').datagrid({
url: '@Url.Action("ApproveRecord")?id=' + '@ViewBag.PlanCode',
methord: 'post',
fitColumns: true,
pagination: false,
striped: true, //奇偶行是否区分
singleSelect: true,
columns: [[
{ field: 'EmployeeName', title: '审核人', width: 80, halign: 'center' },
{
field: 'DoDate', title: '审核日期', width: 50, align: 'center',
formatter: function (value) {
return DataFormatter(new Date(value.replace(/-/, "/")));
}
},
{ field: 'IsPass', title: '是否通过', width: 40, halign: 'center' },
{ field: 'Opinion', title: '审核意见', width: 40, halign: 'center' },
{ field: 'FormCode', title: 'FormCode', width: 50, hidden: true },
{ field: 'EmployeeID', title: 'EmployeeID', width: 40, hidden: true },
{ field: 'ActivityName', title: 'ActivityName', width: 40, hidden: true }
]]
});
});
</script>
唯一不同的就是iDategrid与dategrid
回帖
回帖须知