Hi,
I am trying Jqgrid using web api in mvc4. i have proper libraries for jquery and jqgrid. but still on loading of view page it raise error as "Object doesn't support property or method 'jqGrid'"
Following is the code for that. It will be help if i get solution for this.
@{
ViewBag.Title = "Index";
}
<html>
<head>
<link href="../../Scripts/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<link href="../../Scripts/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/JQGrid/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="../../Scripts/JQGrid/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../Scripts/JQGrid/grid.locale-en.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#tblJQGrid").jqGrid(
{
url: 'api/Values',
datatype: "json",
mtype: 'GET',
colNames: ['ProductID', 'ProductName', 'ProductCategory', 'Price'],
colModel: [
{ name: 'ProductID', index: 'ProductID', width: 20, stype: 'text' },
{ name: 'ProductName', index: 'ProductName', width: 150 },
{ name: 'ProductCategory', index: 'ProductCategory', width: 80, align: "right" },
{ name: 'Price', index: 'Price', width: 80, align: "right" }
],
rowNum: 10,
sortname: 'ProductID',
viewrecords: true,
sortorder: "desc",
caption: "List Product Details",
scrollOffset: 0
});
});
</script>
<title>Index</title>
</head>
<body>
<div>
<div>
<div>
<table id="tblJQGrid">
</table>
<br />
<table id="list">
</table>
</div>
<br />
</div>
</div>
</body>
</html>