Not sure what's wrong my jquery grid loading only 8400 records. Initially I though there may be some data related Issue in tables. But I try to remove each column and tried to load entire ( around 15k ) its not loading its showing only empty grid..
jQuery("#list47").jqGrid({
url: '/vunerability/GetResult/',
//data: mydata,
datatype: 'JSON',
height: 250,
width: 1150,
rowNum: 1000,
rowTotal: 20000,
jsonReader: {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: true,
id: "0",
},
colNames: ['Vunlerability_Id','Vunlerability_Title','Security_Level','IPAddress','Operating_System','Environment', 'Location', 'Status'],
colModel: [
{ name: 'Vunlerability_Id', width: 80, sorttype: "int" },
{ name: 'Vunlerability_Title', width: 100, sorttype: "int" },
{ name: 'Security_Level', width: 90 },
{ name: 'IPAddress', width: 50 },
{ name: 'Operating_System', width: 100, sorttype: "int" },
{ name: 'Environment', width: 60 },
{ name: 'Location', width: 50 },
{ name: 'Status', width: 30 }
],
pager: "#plist47",
rowList: [1000, 2000, 3000],
mtype: "Get",
repeatitems: true,
loadonce: true,
rownumbers: true,
autoencode: true,
gridview: true,
caption: "Open Results"
});
jQuery("#list47").jqGrid('navGrid', '#plist47', { del: false, add: false, edit: false }, {}, {}, {}, { multipleSearch: true });
});
My json Action Result
public JsonResult GetResult()
{
var result = _db.tblVulnerabilities.Where(x => x.Status == "Open").ToList().Take(8500);
var VunList = result
.Select(c => new VunerabilityViewModel.vulnerabilitylistOpenVsClose()
{
Vunlerability_Id = c.Vulnerability_Id,
Vunlerability_Title = c.Vulnerability_Title,
Security_Level = c.Security_Level,
IPAddress = c.AssetIP_Address,
Operating_System = c.Operating_System,
Environment = c.Environment,
Location = c.Location,
Status = c.Status
});
//string json = JsonConvert.SerializeObject(VunList);
return Json(VunList, JsonRequestBehavior.AllowGet);
}
can anyone help me out what I am doing wrong here?
Thanks in advance.