:: Forum >>

setColumnWidth issues


I have been doing some timing and I found something disturbing. When I call setColumnWidth on any given column on a grid the first time, it takes almost 1 second to execute. If I make a second call to it (I am passing in the same value for the width, I am switching back to a grid that has previously been displayed but subsequently erased from the screen) the execution is 1/10 of that. I have a grid with 37 columns, no data, and it takes over 30 seconds to adjust the columns. When I re-display that same grid, it displays in about 2.5 seconds. I got the timing numbers because I call a function that loops through an array of column widths and after setting each column width it updates the window.status so I can see the progress. All of this is done prior to rendering the grid to the page.
Any thoughts?
Jim Hunter (www.FriendsOfAW.com)
Friday, March 3, 2006
Jim, can you reproduce this on an empty page? The following code runs in less than a second (including rendering) -

var obj = new AW.UI.Grid;


    for (var i=0; i<30; i++){
        obj.setColumnWidth(40, i);


I guess there is something else on your page that may be involved.
Alex (ActiveWidgets)
Friday, March 3, 2006
I have 3 grids on the page. But I am replacing just one of them at a time when I see these times. Everything is at the same level on the page, I have no more IFrames like I was using on the grids (they ran very fast then). Everything on the page is an AW object, there is no hand coded HTML, it's all created via Javascript functions.
The only difference in what I am doing compared to your code above is that I have an array of strings for the header, other then that is't basically the same.
I'll keep pounding away at it...
Jim Hunter (www.FriendsOfAW.com)
Friday, March 3, 2006
I am seeing the same problem on IE. A call to setColumnWidth after the grid has been renedered takes a few seconds and uses a 95% of the CPU during those few seconds.

Were you able to find a fix for it, Jim?

Any help?
Friday, August 4, 2006
bump! This is a problem for me. Using 2.0.0
Wednesday, August 23, 2006
I am able to get around this with css.

e.g. :

#gridid .aw-column-0 {width:150;}
Wednesday, August 23, 2006

This topic is archived.

Back to support forum

Forum search