Fred Campos
Fred Campos

Reputation: 1622

jqGrid vertical scrollbar

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

Answers (4)

Minh Tien Tran
Minh Tien Tran

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

Fred Campos
Fred Campos

Reputation: 1622

This did the trick:

.ui-jqgrid-bdiv{
    max-height: 340px;
}

Upvotes: 2

Oleg
Oleg

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

Rachel Gallen
Rachel Gallen

Reputation: 28583

try

 scrollerbar:true
 height:"200"

Upvotes: 6

Related Questions