:: Forum >>

Setting selected row color via code

I'm currently using v2.0.1, and was wondering if there was some way to set the selected row color via code without using CSS of any sort. I'm looking to do something like the following:

var myObj = new AW.UI.Grid;
myObj.getRowTemplate().setSelectedRowStyle("background-color", "#CCCCCC");

I want to do this because I currently don't have a way of modifying the style in the head of the page, so the only way to do it is to write out the style in the body, which - while it works - is bad HTML syntax. Is there any support for this?
Steve
Wednesday, May 27, 2009
>> bad HTML syntax

Why? Because of document.write() or because you prefer styles to be in the head section? In this case I guess you can still use document.write() in the head.

If you don't like document.write() you can manipulate the styles with stylesheets DOM API -

http://msdn.microsoft.com/en-us/library/ms531200(VS.85).aspx
https://developer.mozilla.org/en/DOM/document.styleSheets
Alex (ActiveWidgets)
Friday, May 29, 2009

This topic is archived.


Back to support forum

Forum search