当我使用jqgrid
并希望在网格中呈现more than 5000 records
时,no response body is returned from server
非常奇怪。我有存储过程,它从数据库返回15000条记录。然后从后端C#代码我调用这个过程,然后我将JsonFormat中实体类型List的类型返回给客户端。当我返回例如100的小集时,没有问题。身体响应以json格式返回,但是当我使用大型集时,不会返回任何响应。你觉得怎么样?
的javascript:
jQuery("#accounts #tranGrid").jqGrid({
url: ncb.NCB + "/Home/GetBillingTransasctions",
datatype: "json",
colNames: ['BillingTransactionID', 'AccountID'],
colModel: [
{
name: 'BillingTransactionID', index: 'BillingTransactionID', sortable: false, align: 'left',
editable: true, edittype: 'text', resizable: true, hidden: true, viewable: false
},
{
name: 'AccountID', index: 'AccountID', sortable: false, align: 'left',
editable: true, edittype: 'text', resizable: true, hidden: true, viewable: false
}
],
rowNum: 10,
rowList: [10, 20, 30],
pager: '#tranPager',
sortname: 'BillingTransactionID',
viewrecords: true,
sortorder: "desc"
}).navGrid("#tranPager", { edit: false, add: false, del: false });
C#代码
var obj = new {
total = pTotal,
page,
records = Manager.GetBillTranCount(accountID),
rows = Manager.GetAllBillTranPaged(sRowIndex, eRowIndex, sidx, sord, accountID)
};
return new JsonResult() { Data = obj, JsonRequestBehavior = JsonRequestBehavior.AllowGet };