0

I want to add the pager of the jqGrid on a different place then after the body of the jqGid. But the div is always set after the body of the jqGrid...

I want it like:

<div id='header'>Header</div>
<div id='scroller'>
    <div><table>jqGrid body</table></div>
</div>
<div id='pager'>pager</div>

But jqGid always put the pager div like:

<div id='header'>Header</div>
    <div id='scroller'>
        <div><table>jqGrid body</table></div>
        <div id='pager'>pager</div>
    </div>

Is there a solution to put the pager div where you like in the page??

I want this because i have a many columns. When a put the option: autowidth: true is will show a scrollbar, that's correct. But when the user resize the browser i want that the following:

  1. Table hold the current size.
  2. The div who contains the table wil resize and show a scrollbar.
  3. Header and footer will resize(they are always visible and they are not a part of the scroll div)
amernov
  • 626
  • 1
  • 8
  • 18

1 Answers1

0

If I understand you correct you should just use shrinkToFit:false setting of jqGrid. You can optionally combine it with autowidth:true or set width parameter of jqGrid and change it if the browser windows will be resized (call setGridWidth on every resize event see here for details).

Look at the demo and another one which has the horizontal scroll bar only on the grid body and not on the pager or header. enter image description here

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thanks! That helped me out! I used: $("#jqGrid").setGridWidth($(window).width()) and that did the trick! – amernov Apr 22 '11 at 15:01