I'm trying to call jqGrid's setGridWidth function, but I'm getting the error:
Object [object Object] has no method 'setGridWidth'
I'm sure this is something stupid. Here's the code to display the grid (which is fine) and then try to resize it.
$("#jqGridElement").jqGrid({
datastr: tableSrc,
jsonReader: { repeatitems: false },
datatype: "jsonstring",
colNames: ['title', 'subtitle'],
colModel: [
{ name: 'title', index: 'title', width: 55 },
{ name: 'subtitle', index: 'subtitle'}],
height: 'auto',
gridview: true
});
$("#jqGridElement").setGridWidth(600);'
EDIT
I've also tried:
var gridObj = $("#jqGridElement").jqGrid({ datastr: tableSrc, .......
gridObj.setGridWidth(300);
Same result