jqGrid vertical scrollbar
Asked Answered
B

4

5

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    

});
Brython answered 24/1, 2013 at 13:34 Comment(0)
Q
12

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.

Questioning answered 24/1, 2013 at 13:55 Comment(3)
The above answer helped to resolve the issue related to display of vertical scroll bar in jqGrid for IE9 browser.Savino
This was the only way I could get it to work. $('.ui-jqgrid .ui-jqgrid-bdiv').css({ 'overflow-y': 'scroll' });Slayton
@styfle: What I mean is definition of CSS: <style type="text/css">.ui-jqgrid .ui-jqgrid-bdiv { overflow-y: scroll }</style>. Declarative CSS works more quickly as setting style attribute on <table>. In general the results should be the same.Questioning
P
6

try

 scrollerbar:true
 height:"200"
Parrisch answered 24/1, 2013 at 13:39 Comment(1)
That doesn't seem to make a difference.Brython
B
2

This did the trick:

.ui-jqgrid-bdiv{
    max-height: 340px;
}
Brython answered 28/1, 2013 at 11:36 Comment(0)
A
0

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

Angleworm answered 30/9, 2020 at 3:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.