I have Got Error When Create JQGrid in Index View
i have also Load All Needed JS & CSS File for JQGrid
rather than i get Above Error in Firebug
Please Suggest me to Implement of JQGrid in Right Way or Help to Solve My Error
i have Declare My Code Bellow.
Include JS File---------
<pre lang="xml"><link href="~/Content/jqGrid/css/ui.jqgrid.css" rel="stylesheet" />
<link href="~/Content/jqGrid/css/ui.all.css" rel="stylesheet" />
<script src="~/Content/jqGrid/js/i18n/grid.locale-en.js"></script>
<script src="~/Content/jqGrid/js/jquery.jqGrid.js"></script>
<script src="~/Content/jqGrid/js/jquery.jqGrid.min.js"></script>
<script src="~/Content/jqGrid/js/jquery.jqGrid.src.js"></script>
<script src="~/Content/jqGrid/js/jquery.ui.all.js"></script>
---------html code --------
<table id="student-grid-json"></table>
<div id="pager-json"></div>
$(document).ready(function (e)
{
$("#student-grid-json").jqGrid
({
url: '',
datatype: 'json',
mtype: 'GET',
no_legacy_api : true,
useJSON : true,
colNames: ["Student ID", "Name", "Course", "Year"],
colModel:
[
{ name: "StudentID", index: "StudentID" },
{ name: "Name", index: "Name" },
{ name: "Course", index: "Course" },
{ name: "Year", index: "Year", sorttype: "int" }
],
multiselect: true,
shrinkToFit: false,
caption: 'Student List Loading via Array'
});
var students = [
{StudentID:"JC200300001", Name:"Jessica Cohen", Course:"Applied Arts and Sciences", Year:"1" },
{StudentID:"SF200800002", Name:"Shane Foster", Course:"Business Administration", Year:"2" },
{StudentID:"KK200800003", Name:"Kellan Kher", Course:"Social Sciences", Year: "4" },
{StudentID:"PS200100004", Name:"Patrick Shirazi", Course:"Education", Year:"1" },
{StudentID:"CB200400005", Name:"Constance Barry", Course:"Social Sciences", Year:"3" },
{StudentID:"DW200400006", Name:"Dustin Wallace", Course:"Philosophy", Year:"1" },
{StudentID:"AG200900007", Name:"Amal Goodman", Course:"Education", Year:"2" }
];
for (var x = 0; x <= students.length; x++)
{
$("#student-grid-json").addRowData(x, students[x]);
}
});