split grid. resizing grid to fit resized window

I found this article you had addressed earler:



“Question posted by Daniel Balandran on Feb 28, 2008 17:22 open in interactive version



Resizing a window in spilt mode



I am trying to get the scroll bars to resize with the window when the grid is in splitAt() mode. I there a work around for this. I don’t want the columns to resize with the window, just the scroll bars.



Thank you

Answer posted by Support on Mar 04, 2008 03:43

While there is no public API, you can set the width of left area of grid as

grid._fake.correctSplit(width_as_int)



If width will be lesser than summ of columns heights - the scrollbar will appear."



I’m trying to do the same thing, to get the right side of the split grid to resize to fit the new window width. I am running something like this in javascript:



document.body.onresize = function (){

var width = document.getElementById("cgrid2
???”).style.width;

grid._fake.correctSplit(width);

}



The problem is that the width of the frozen columns id changes each time you load the page. All i know is it has the prefix of "cgrid2
". How can I find the current width of the frozen cols?


>>How can I find the current width of the frozen cols?


Technically you can use getColWidth command for all leftmost columns, and calculate actual widht of left part.
Also, next can be used
visible width of left part
grid._fake.objBox.offsetWidth;
full width of left part
grid._fake.objBox.scrollWidth;