I have added all necesary Jquery & JqGrid scripts and css.
I am using MVC5.
i got "Uncaught TypeError: Cannot read property 'msie' of undefined" error.
So I have added jquery-migrate-1.2.1 script. after Jquery.
--warning msg JQMIGRATE: jQuery.browser is deprecated.
What I have tried:
$(document).ready(function () {
debugger;
$('.Importtbl').jqGrid({
datatype: 'Json',
mtype: 'GET',
url: '@Url.Action("ImportData", "ReportablePayments")',
colNames: ['PaymentDate', 'PayeeName', 'SrcDocType', 'Amount', 'Check Number', 'Object Code'],
colModel: [
{ name: 'PaymentDate', index: 'PaymentDate', width: 20 },
{ name: 'PayeeName', index: 'PayeeName', width: 50 },
{ name: 'SrcDocType', index: 'SrcDocType', width: 20 },
{ name: 'Amount', index: 'Amount', width: 15 },
{ name: 'CheckNumber', index: 'CheckNumber', width: 20 },
{ name: 'ObjectCode', index: 'ObjectCode', width: 10 }
],
pager: '#pager',
caption: 'Import Raw DATA',
viewrecords: true,
rowNum:10
})
});
----Controller.cs
public ActionResult ImportData(int rows,string sidx,string sord,int page)
{
return Json(null,JsonRequestBehavior.AllowGet);
}