jquery - How to sync header and column separator lines if scrolled to rightmost position in free jqgrid -


if jqgrid scrolled rightmost position, column separator lines out of sunc.

to reproduce, make jqgrid wider browser window or decrease browser window width horizontal scrollbar appear , scroll horizontally rightmost position. header , column separator vertical lines in different positions.

how fix ?

you have long code. it's not goal of stackoverflow debug code. prepare small demo reproduce problem?

i debugged code , see grid have no horizontal bar @ initial loading. free jqgrid contains detection whether grid contains horizontal bar after data loaded. sets padding-right of hbox (the div children of hdiv , have class ui-jqgrid-hbox) width of scroll bar: bdiv.offsetwidth - bdiv.clientwidth (see the line , this one of code).

if click on reload grid button of grid problem scroll bar fixed. suppose make changes on page after data loaded. result grid horizontal scroll bars. jqgrid don't detect changes , problem exist.

what can call fixscrolloffsetandhboxpadding method manually after makes unclear changes on page crates horizontal scroll bars. change width of grid example (probably $grid.jqgrid('setgridwidth', $('#grid1container').width(), false);).

what can include call

$grid[0].fixscrolloffsetandhboxpadding(); 

somewhere after scrollbar of grid created. fixscrolloffsetandhboxpadding public , it's member of dom of grid (see the line). the above code should work.

if execute line $("#grid")[0].fixscrolloffsetandhboxpadding(); in console of debugger see problem solved.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -