A JQ Grid is a light weight open source grid developed in JavaScript Jquery to fill data from the database.
To download the JQ Grid js file go to the following site:
Now I will create an ASP.Net application where I will display the record from an array through the JQ Grid.
Step 1:
In Visual Studio 2010 first create a simple ASP.Net MVC3 web application project named "mvc3test1".

Figure 1:
Step 2:
After that add the required JS file and folder for the JQ grid. The folder and file structure will look as shown in the following figure1 marked with red.

Figure 2:
See here in the "css" folder we have a style sheet named "jquery-ui-1.8.12.custom.css" and also under the "js" folder is the required "js" file for jq grid.
Step 3:
Now go to the "Index.cshtml" under the "Views" folder.

Step 4:
Now copy the following code there:
@{
ViewBag.Title = "Home Page";
}
<link href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
<link href="../css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="../js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="../js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../Scripts/json2-min.js" type="text/javascript"></script>
<script src="../js/jquery.jqGrid.src.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
jQuery("#list1").jqGrid({
datatype: "local",
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
colModel: [
{ name: 'id', index: 'id', width: 60, sorttype: "int" },
{ name: 'invdate', index: 'invdate', width: 90, sorttype: "date" },
{ name: 'name', index: 'name', width: 100 },
{ name: 'amount', index: 'amount', width: 80, align: "right", sorttype: "float" },
{ name: 'tax', index: 'tax', width: 80, align: "right", sorttype: "float" },
{ name: 'total', index: 'total', width: 80, align: "right", sorttype: "float" },
{ name: 'note', index: 'note', width: 150, sortable: false }
],
multiselect: true,
rowNum: 10,
rowList: [5, 10, 20, 50, 100],
pager: jQuery('#pager1'),
sortorder: "desc",
viewrecords: true,
subGrid: true,
subGridUrl: 'Default.aspx',
subGridModel: [{ name: ['No', 'Item', 'Qty', 'Unit', 'Line otal'],
width: [55, 200, 80, 80, 80]
}
],
caption: "Manipulating Array Data"
});
jQuery("#list1").jqGrid('navGrid', '#pager1', { del: false, add: false, edit: false }, {}, {}, {}, { multipleSearch: true });
var mydata = [
{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
{ id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
{ id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" },
{ id: "4", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
{ id: "5", invdate: "2007-10-05", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },



kickAss DeveloperPosted Apr 1, 2015, 12:10 PM
I followed step by step and whoa! it worked. thank you so much! Keep posting..
Omprakash DudhagundiPosted Aug 5, 2014, 4:29 AM
Provide code (
basheed sayadPosted Dec 31, 2013, 5:21 AM
Thanks for your replay,but downloading problem in that rar file,please check it and upload again .
JohnPosted Sep 28, 2012, 1:50 AM
Excellent article... How can I download the code? I went to your part 1 and downloaded mvc3test1.rar file. But this file seems to be an invalid .rar file as I am unable to open it. Appreciate posting the code in .zip format.
pratapPosted Jul 31, 2012, 9:05 AM
not able to download source code
enzo sangiorgiPosted Jul 30, 2012, 3:28 PM
I cannot downoload source code
Arsalan AtaPosted May 30, 2012, 1:02 PM
I m downloading the source code but unable to extract rar file due to rar is corrupted.
claudiaPosted May 16, 2012, 10:56 AM
el .rar esta dañado
ahsan awanPosted Apr 19, 2012, 6:24 AM
What the PLUS button do. beside Inv No
Nic RochePosted May 24, 2011, 4:01 PM
The project files are not supplied...