jQuery MiniUI

标题: MINIUI的分页不正常 [打印本页]

作者: zhou259358    时间: 2016-2-3 11:47:24     标题: MINIUI的分页不正常

[attach]7099[/attach]如图,每页10条,但是全部显示了,以下为初始化控件:function LoadGrid() {    Grid.set({
        url: Url,
        style: "width:100%;height:" + ($(document).height() - 118) + "px",
        allowAlternating: true,
        allowUnselect: true,
        multiSelect: true,
        ondrawcellrawA,
        pageSize: 10,
        idField: "id",
        columns: [
            { type: "checkcolumn", width: "30px" },
            { header: "申请编号", field: "AppNumber", allowSort: "true", width: "80px", align: "center", headerAlign: "center"},
            { header: "申请单位/部门", field: "AppDepartment", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "受益人", field: "Beneficiary", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "履约合同名称", field: "ContractName", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "合同编号", field: "ContractNub", allowSort: "true", width: "60px", align: "center", headerAlign: "center" },
            { header: "合同金额", field: "ContractMoney", numberFormat: "¥#,0.00", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "担保类型", field: "GuaType", allowSort: "true", width: "80px", align: "center", renderer: "GetGuaType", headerAlign: "center" },
            { header: "经办人", field: "Operator", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "经办人电话", field: "OperatorPhone", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "担保金额", field: "GuaMoney", numberFormat: "¥#,0.00", allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "担保金额比", field: "GuaAmount",  allowSort: "true", width: "80px", align: "center", headerAlign: "center" },
            { header: "担保有效期", field: "GuaDate", allowSort: "true", width: "100px", align: "center", dateFormat: "yyyy-MM-dd", headerAlign: "center" },
            { header: "是否失效", field: "IsInvalid", allowSort: "true", width: "60px", align: "center", renderer: "ShowInvalid", headerAlign: "center" },
            { header: "状态", field: "State", allowSort: "true", width: "60px", align: "center", renderer: "ShowState", headerAlign: "center" }
        ]
    });
    Grid.render($("#grid_form")[0]);
    Grid.load({ method: "GetManagementList", Kind: Kind, RecordID: RecordID });
}

哪里出错了?求助。



作者: zhou259358    时间: 2016-2-3 11:57:08

已经找出问题了,Context.Response.WriteToJsonByPage<IList<FinancialManagementItem>>(list, count);
count的格式不对,为list.count的情况会出错
作者: dforce    时间: 2016-2-3 15:19:09

zhou259358 发表于 2016-2-3 11:57
已经找出问题了,Context.Response.WriteToJsonByPage(list, count);
count的格式不对,为list.count的情况 ...

好的,这情况一般都是后台有错误了,没有根据传递的数据来查询返回数据




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2