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
Here is how I did it and so far, so good. Basically, we resize the grid to accommodate the vertical scroll bar and by resizing, there is no horizontal overflow and therefore, the horizontal bar never shows up. Our cell sizing remains the same and the last cell is not partially hidden.
loadComplete: function (data) {
//set our "ALL" select option to the actual number of found records
$(".ui-pg-selbox option[value='ALL']").val(data.records);
if ($(".ui-jqgrid").height() > $('#grid').getGridParam('maxHeight')) {
//resize our grid for the vertical scroll bar to eliminate the hortizontal scroll bar
$(".ui-jqgrid").css("width", $('#grid').getGridParam('width') + 20);
$(".ui-jqgrid-bdiv").css("width", $('#grid').getGridParam('width') + 17);
$(".ui-jqgrid-hdiv").css("width", $('#grid').getGridParam('width') + 20);
$(".ui-jqgrid-view").css("width", $('#grid').getGridParam('width') + 20);
$("#pager").css("width", $('#grid').getGridParam('width') + 20);
$(".ui-jqgrid-hbox").css("padding-right", "16px");
} else { //set everything to defaults
$(".ui-jqgrid").css("width", $('#grid').getGridParam('width'));
$(".ui-jqgrid-bdiv").css("width", $('#grid').getGridParam('width'));
$(".ui-jqgrid-hdiv").css("width", $('#grid').getGridParam('width'));
$(".ui-jqgrid-view").css("width", $('#grid').getGridParam('width'));
$("#pager").css("width", $('#grid').getGridParam('width'));
$(".ui-jqgrid-hbox").css("padding-right", "0px");
}
}