I downloaded the latest version of jqGrid (3.5.3), including all of the options. However, when I try to use it, I get the data back but it is not being formatted correctly (read “at all”). Firebug is giving me the error “$.jgrid.formatter is undefined” in the jQuery.jqGrid.min script. My code looks like this:
jQuery(document).ready(function() {
jQuery("#grid").jqGrid({
jsonReader: {
root: "Rows",
page: "Page",
total: "Total",
records: "Records",
repeatitems: false,
userdata: "UserData",
id: "Id"
},
url: '/Test/TestGridData/',
datatype: 'json',
mtype: 'GET',
colNames: ['Id', 'Name', 'Internal ID'],
colModel: [
{ name: 'Id', index: 'Id' },
{ name: 'Name', index: 'Name' },
{ name: 'InternalId', index: 'InternalId'}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'Id',
sortorder: "desc",
viewrecords: true,
imgpath: '/scripts/themes/coffee/images',
caption: 'My first grid'
});
});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top