Forum
17:09
03/05/2010
I would like to encapsulate the grid into a box and give the box a padding and margin. The padding and margin don't seem to affect the width of the grid.
Then resizing the grid is complicated, because a setGridWidth function is needed to set the grid width and column widths right. Especially when the user has resized the columns. An extra complexity over /blog/?page_id=393/feature-request/resizable-jqgrid-my-solution-but-needs-improving/&value=width&type=1&include=1&search=1
Maybe I overlooked a functionality, but is there a possibility to make those widths relative?
You can use percentages instead of pixels to determine grid width and column widhts instead of pixels.
Percentages can be set with an accuracy of .1%. For example a grid of 1680 pixels wide can be set with 1.7 pixels accuracy (=.1%).
(What disadvantages comes with this change?)
Can you set the column widths and grid width to % instead of pixels?
18:03
03/05/2010
I solved the problem by encapsulating another div.
<div style="position:relative; margin:10px; padding:4px; width:auto;" id="A">
<div style="position:relative; padding:0; margin:0;" id="B">
<table id="jqGrid"></table>
</div>
</div>
setting padding to #B will not resize the grid.
setting padding to #A will resize the grid.
Most Users Ever Online: 715
Currently Online:
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66