How do I change the BackColor of a Selected Row in the UltraWinGrid? I tried doing an override in code and changing it to white, but it made everything white (including the text).
Here is the code I tried:
MyGrid.DisplayLayout.Override.SelectedRowAppearance.BackColor = Color.White
Thanks for any help.
This KB article can help you with that:
HOWTO:How can I have Selected cells in a grid maintain their forecolor?
Thanks Mike.
The issue with setting the ForeColor is that I have conditional settings based on whether the text (which is money) is positive or negative. Setting the ForeColor to a color then nullifies my conditional formatting.
Hi Andrew,
The Selected ForeColor is probably just already white. So if you are going to make the BackColor White, you should change the ForeColor to something not white.
Hello,
whenever the row is selected following event is fired, and, so do the following:
private void ultraGrid1_BeforeRowActivate(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e) { this.ultraGrid1.Rows[e.Row.Index].Appearance.BackColor = Color.White; }