Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sh4k

Pages: [1]
1
Help for ParamQuery Grid (free version) / Re: CSS Style
« on: May 14, 2014, 03:24:30 pm »
There is no way to specify %.

Work around would be to calculate the width and height of the parent component and set the width and height of the grid.

For example, consider this to be the parent element and grid :

HTML:
Code: [Select]
<div id="control">
<div id="grid_array"></div>
<div>

Javascript:

For the first page load, before the grid is created, try something like this(inside jQuery ready function)-

Code: [Select]
//parent container height
var ht = $("#control").height();
//parent container width
var wd = $("#control").width();

//use the width and height vars while creating the grid
var obj = { width: wd, height: ht, title: "",resizable:false,draggable:false}; //change other options as required
Next up, on window resize :

Code: [Select]
$(window).resize(function () {
var ht = $("#control").height();
var wd = $("#control").width();
var grid = $("#grid_array");
grid.pqGrid("option", { width: wd, height: ht});
}


You might want to check out if width() and height() work for you, otherwise try inner* and outer* functions.


Pages: [1]