obj.setColumnWidth hangs the grid and CPU processing goes to 99%
Our Grid has 22 columns and 25 rows.When I call obj.setColumnWidth(100,1) the cpu processing goes to 99% and after full grid rendering the page remains locked for about 3 seconds.We are calling setColumnWidth on 22 columns because each columns has its own width.
We tried to study why this is occuring by studying the code of grid library.
onColumnWidthChanged: function(width, column)
if (AW.ie && this.getScrollTemplate().element())
this.getScrollTemplate().element().className += ""
var w = (width - AW.dx) + "px", c = column;
var i, ss = document.styleSheets[document.styleSheets.length - 1];
var selector = "#" + this.getId() + " .aw-column-" + c;
var rules = AW.getRules(ss);
for (i = 0; i < rules.length; i++)
if (rules[i].selectorText == selector)
rules[i].style.width = w;
AW.addRule(ss, selector, "width:" + w)
The AW.Grid.Controllers.Width has setTimeout function which keeps the grid busy for 3-4 seconds .Removal of this function makes everything perfect but the changing the width of header does not keeps the body of grid in synch with header.
Its a bug that we have found in the Grid Library .
I have already posted the same affect in the following post :
I have seen a post in which this bug has already been reported.
The above post suggest to fix it using css.But I am not sure how to do this .We dont require page refresh every time.
Can you provide a temporary fix for the defect?