iDatagrid显示每页数数也实际数据不一致,行数也不一致

提问 未结 1 5063
悬赏:20飞吻
显示样式如下图:

具体代码如下:
<body>
<table id="productDg"></table>
<script>
$(function() {
var productDg = {
type: 'datagrid',
id: 'productDg'
};
var url = nyconfig.Config.requestPath;
url += "/ajax/login.ashx?act=GetDWInfo&&login=" + localStorage.getItem('nyusername') + "&&n=new Date()";
$("#productDg").iDatagrid({
fitColumns: true,
remoteSort: false,
//url: url, //'../../json/product-list.json',
data: [
{DWName:'DWName', Id:'Id',DWBH:'DWBH',DWJC:'DWJC',TopDWName:'TopDWName'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName2', Id:'Id2',DWBH:'DWBH2',DWJC:'DWJC2',TopDWName:'TopDWName2'},
{DWName:'DWName21', Id:'Id21',DWBH:'DWBH21',DWJC:'DWJC21',TopDWName:'TopDWName21'}
],
frozenColumns: [
[{
field: 'DWName',
title: '客户名称',
sortable: true
}]
],
columns: [
[{
field: 'Id',
title: 'Id',
checkbox: true
},
{
field: 'DWBH',
title: 'DWBH',
sortable: true
},
{
field: 'DWJC',
title: '客户简称',
sortable: true
},
{
field: 'TopDWName',
title: '所属公司',
sortable: true
}
]
]
});
});
</script>
</body>
回帖
回帖须知