How to dynamically change font color on a hyperlink?
Hi All,
I read trough the forum but could not find an answer for this. I did set up the css properties for the link in my css file like this:
"
a:link{
color: coral;
}
a:visited{
color: yellow;
}
a:hover{
color: red;
}
"
Then I have a function that should change the font color based on a value from a cell
"
activeGrid.defineRowProperty("fontColor", function(row){
return this.getCellValue(3, row)=='S' ? "white" : "#003399";
});
for(var i=0;i<activeGrid.getRowCount();i++){
activeGrid.getRowTemplate(i).setStyle("color", function(){return this.getRowProperty("fontColor");});
activeGrid.getRowTemplate(i).getCellTemplate(0, i).setStyle("color", function(){return this.getRowProperty("fontColor");});
}
"
Could please someone tell me what I am doing wrong?
Thanks!
I read trough the forum but could not find an answer for this. I did set up the css properties for the link in my css file like this:
"
a:link{
color: coral;
}
a:visited{
color: yellow;
}
a:hover{
color: red;
}
"
Then I have a function that should change the font color based on a value from a cell
"
activeGrid.defineRowProperty("fontColor", function(row){
return this.getCellValue(3, row)=='S' ? "white" : "#003399";
});
for(var i=0;i<activeGrid.getRowCount();i++){
activeGrid.getRowTemplate(i).setStyle("color", function(){return this.getRowProperty("fontColor");});
activeGrid.getRowTemplate(i).getCellTemplate(0, i).setStyle("color", function(){return this.getRowProperty("fontColor");});
}
"
Could please someone tell me what I am doing wrong?
Thanks!
Adriana Viman
July 20,