I like that we are able to customize the active cells bgcolor, but would it be possible set a css style to every cell that gets a bgcolor set to it? We need to have links change color based upon if they're highlighted or not (they need to switch to a lighter color when highlighted to be readable).
I am not very clear about your request. Could you please describe it in detail?
To set a new Background color for the highlighted cell, use GridWeb.ActiveCellBgColor;
To set the normal cell's background color, use GridWeb.ViewTableStyle.BackColor;
for an example:
GridWeb1.PresetStyle = PresetStyle.Colorful1; // First sets a base preset style GridWeb1.PresetStyle = PresetStyle.Custom; // Required for seting the following customized styles. GridWeb1.ActiveCellBgColor = Color.Yellow; GridWeb1.ViewTableStyle.BackColor = Color.Red;
I was requesting the ability to set a CSS style that I can define would get set on any highlighted cells. Our particular issue is we have a hyperlink in excel that when you change the background color to indicate that it is highlighted makes it difficult to read. In our application we typically switch the hyperlink color to white when it is highlighted as to keep it readable.
Well, I see. We have found that the hyperlink has a problem. It always displayed with the system default anchor's color. And it never shows the color of the cell which contains it. We will fix this problem. And you will set the hyperlink's color by setting its container cell's color.