set width of jqgrid code example
Example 1: set width of jqgrid
var DataGrid = $('#gridId');
//sets the grid size initially
DataGrid.jqGrid('setGridWidth', parseInt($(window).width()) - 20);
//handles the grid resize on window resize
$(window).resize(function () {
DataGrid.jqGrid('setGridWidth', parseInt($(window).width()) - 20);
});
Example 2: set width of jqgrid
$('#gridId').jqGrid('setGridWidth', '800');