jquery pleb jqgrid issue
jquery pleb jqgrid issue
I am looking to use jqgrid in an mvc application, because filters & paging on the same form are problematic at best.
I can get a basic grid going, but when I try and use filtering I get the error:
Microsoft JScript runtime error: Object doesn't support this property or method...
I have no idea what method it is talking about but the following code works with the lines commented out, but when I comment them in I get the error.
-
jQuery(document).ready(function() {
// var mygrid = jQuery("#list").jqGrid({
jQuery("#list").jqGrid({
url: '/Home/GetMovieData/',
datatype: 'json',
mtype: 'GET',
colNames: ['id', 'Movie Name', 'Directed By', 'Release Date', 'IMDB Rating', 'Plot', 'ImageURL'],
colModel: [
{ name: 'id', index: 'Id', width: 55, sortable: false, hidden: true },
{ name: 'Movie Name', index: 'Name', width: 250 },
{ name: 'Directed By', index: 'Director', width: 250, align: 'right' },
{ name: 'Release Date', index: 'ReleaseDate', width: 100, align: 'right' },
{ name: 'IMDB Rating', index: 'IMDBUserRating', width: 100, align: 'right' },
{ name: 'Plot', index: 'Plot', width: 55, hidden: true },
{ name: 'ImageURL', index: 'ImageURL', width: 55, hidden: true}],
pager: jQuery('#pager'),
rowNum: 5,
rowList: [5, 10, 20],
sortname: 'id',
sortorder: "desc",
height: '100%',
width: '100%',
viewrecords: true,
gridview: true,
imgpath: '/Content/jqGridCss/redmond/images',
caption: 'Movies from 2008'
})
// .navGrid('#pager', { edit: false, add: false, del: false, search: false, refresh: false })
// .navButtonAdd("#pager", { caption: "Toggle", title: "Toggle Search Toolbar", buttonicon: 'ui-icon-pin-s', onClickButton: function() { mygrid[0].toggleToolbar() } })
// .navButtonAdd("#pager", { caption: "Clear", title: "Clear Search", buttonicon: 'ui-icon-refresh', onClickButton: function() { mygrid[0].clearToolbar() } });
// mygrid.filterToolbar();
});