What is the width or display css property of grid's parent element?
The point is grid ancestors also need to be fluid. Example: http://paramquery.com/pro/demos/fluid_window
I got your mean. But I haven't achieved this new feature with my code. My current developed on Salesforce.com platform. There are some Salesforce packaged tags in my page. But the basic structure is similar as our general html page.
And I use another way to let my grid auto suit the browser width, but when I change to new paramquery version, this way can't work well.
Please have a look with my code:
About the grid attribution:
var obj = {
// other attributions...
width: $(window).width()-50
}
And the js code:
var currentHeight;
var currentWidth;
$(window).resize(function () {
var windowHeight = $(window).height();
var windowWidth = $(window).width();
if (currentHeight == undefined || currentHeight != windowHeight
|| currentWidth == undefined || currentWidth != windowWidth) {
currentHeight = windowHeight;
currentWidth = windowWidth;
//resize param grid with
$("#grid_json").pqGrid("option", "width", windowWidth-50);
//$("#grid_json").pqGrid("option", "width", 500);
}
});
By this code, I can reset the grid width when I change browser width in old version. But with "paramquery-2.1.0", it doesn't work.
Do you know why this happened? Whether I use a wrong way to set the grid width?
Thank you!