Reputation: 1622
Is it possible to have a jqGrid to insert a vertical scrollbar instead of increasing its height as new rows are requested from the pager?
My current code is as follows:
$("#grid").jqGrid({
url:'/someUrl',
datatype:"json",
mtype:'GET',
shrinkToFit:true,
forceFit:true,
autowidth:true,
altRows:true,
cellEdit:true,
altclass:'altRowClass',
multiselect:true,
rowNum:15,
height:300,
rowList:[15, 50, 100, 1000],
rowNum:15
});
Upvotes: 5
Views: 30858
Reputation: 1098
vertical scroll
gridComplete: function () {
$('#gbox_workshopPersonGrid .ui-jqgrid-bdiv').css({ 'height': '100%', 'max-height': '450px', 'overflow-y': 'scroll', 'overflow-x': 'hidden' });
}
note: workshopPersonGrid is your grid name
Upvotes: 0
Reputation: 222017
If I correct understand your question you can add CSS like
.ui-jqgrid .ui-jqgrid-bdiv { overflow-y: scroll }
to force displaying of the vertical scrollbar in the grid.
Upvotes: 12