3.2.0

Changing text color on row select in a column of Links

Hi folks
(happy new year to all)

I have a column in a grid that contains Links made with the Links template:

obj.setCellTemplate(new AW.Templates.Link, 7);   
obj.getCellTemplate(7).setStyle("color", "blue");
obj.getCellTemplate(7).setStyle("cursor", "pointer");
obj.onCellClicked = function(event, col, row){...etc.. etc...}


As you see the text for the link is coloured blue.

The row select color is blue, so unfortunately when a row is selected the text in the links column gets losts in the blue background.

I wish, therefore, to change the text colour in the links column to white when the row is highlighted - just as the behaviour for regular columns in the grid.

More by luck than judgement I hit upon specifying a css style that achieved exactly this - but unfortunately it works in FF but not in IE:

.aw-rows-selected .aw-templates-link .aw-item-box {color: #fff;}


Can anybody suggest what would work for IE?

Also, I don't really understand the way in which AW puts together the class attrribute for cells. When you look at rendered source you see very long class attributes (e.g. class="aw-templates-list aw-text-normal aw-grid-row aw-row-117 aw-rows-normal aw-alternate-even"). When I put together the css above (.aw-rows-selected .aw-templates-link .aw-item-box) I wasn't really sure what I was doing i.e. how/why these three components work in combination. Any enlightenment on this subject would be greatfully received!!

Thanks
Will



Will
January 7,
... changing the css from
.aw-rows-selected .aw-templates-link .aw-item-box {color: #fff;}

to
.aw-rows-selected .aw-templates-link .aw-item-text {color: #fff;}

made it work in IE as well as FF
(.. but I still don't really understand why)
Will
January 7,

This topic is archived.

See also:


Back to support forum