:: Forum >> Version 2 >>

[ER] Grid.setStyle() to add CSS directives to current CSS

Hi,

_size.js!AW.Grid.Controllers.Size defines a setStyle() function allowing to add CSS directives to document.styleSheets[document.styleSheets.length-1]

Could it be possible to call a similar function at any time?

Something like
obj.setStyle(selectorattributevalue);
 
Thierry Nivelet (FoxInCloud)
Monday, February 20, 2012
I am not sure if this is a good idea. Modifying the stylesheet is a very expensive operation, basically IE re-renders all elements on the page after each update, so it might be extremely heavy. Also IE has a bug/feature where the content of the nested <table> tags in some cases does not get repainted after stylesheet modification - AW has to explicitly trigger repaint after changing the column width (just in case someone puts the grid into a table cell, for example, when using tables for page layout).
Alex (ActiveWidgets)
Wednesday, February 22, 2012
Thanks Alex,

Understand your concern,

We'll do a similar implementation in our own javaScript
Thierry Nivelet (FoxInCloud)
Thursday, February 23, 2012



This topic is archived.

Back to support forum

Forum search