I developed AJAX interface with jQuery and jqGrid.
How I can remove horizontal scrollbar from my jqGrid table?
http://dskarataev.ru/jqgrid.png
If I s
setGridWidth will definitely resize your grid to that of the given new width, but make sure you use it with autowidth=true. setGridWidth may have problem with IE 7 or so.
Some working solutions discussed here (in case if you are yet to find a solution),
Resize jqGrid when browser is resized?
http://www.trirand.com/blog/?page_id=393/discussion/browser-resize-how-to-resize-jqgrid/
----old----
There are couple of options you can try,
From http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options
"autowidth" : true
or
"shrinkToFit": false
Otherwise post your jqgrid code, let us analyze.
a bit late, but might be useful for someone
You must set the height of the table only in numbers, without 'px' at the end
There are some situations where jqGrid calculate the grid width incorrect. You can try to increase cellLayout
parameter (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options). This may be needed if you change some CSS from jqGrid.
In some other situations you can correct the width with respect of the function fixGridWidth
or fixGridSize
which I have described in Correctly calling setGridWidth on a jqGrid inside a jQueryUI Dialog. Don't forget, that you should use it inside of loadComplete
.
This works for me
<style type="text/css">
.ui-jqgrid-bdiv {
overflow-x: hidden !important;
}
</style>
I adjust this type of CSS in my jqgrid
.ui-jqgrid .ui-jqgrid-bdiv {
position: relative;
margin: 0;
padding: 0;
overflow: auto;
text-align: left;
}
Set an explicit width
on the grid and use
autowidth: false,
shrinkToFit: true