jQuery(document).ready(function () {
jQuery(“#list”).jqGrid({
datatype: processrequest,
mtype: 'POST',
jsonReader: {
root: “rows”, //arry containing actual data
page: “page”, //current page
total: “total”, //total pages for the query
records: “records”, //total number of records
repeatitems: false,
id: “ID” //index of the column with the PK in it
},
colNames: ['Name', 'Title'],
colModel: [
{ name: 'name', index: 'name', width: 250 },
{ name: 'title', index: 'title', width: 250 }
],
pager: '#pager',
rowNum: 10,
rowList: [10, 20, 30],
sortorder: “desc”,
viewrecords: true,
height: '250px',
caption: 'My first grid'
}).navGrid('#pager', {edit: false, add: false, del: false});
});