Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Widths in grid in % instead of px
07/05/2010
17:09
Avatar
marinos
Member
Members
Forum Posts: 4
Member Since:
03/05/2010
sp_UserOfflineSmall Offline

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?

07/05/2010
18:03
Avatar
marinos
Member
Members
Forum Posts: 4
Member Since:
03/05/2010
sp_UserOfflineSmall Offline

I solved the problem by encapsulating another div. Smile

<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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information