Hi
I have a grid that the user is entering information into.
If one of the values is set a certain way we highlight a cell that needs attention by changing its background colour.
If however the row is selected/highlighted all custom background formatting is not visible so the user is unable to see that a cell has been highlighted.
How do I either turn off the highlighting of a row or override the highlighting with my background at run time
None of the below appear to work in the initialize row event:
e.Row.Cells["Weight"].Appearance.BackColor = Color.Tomato;
e.Row.Cells["Weight"].Appearance.BorderColor = Color.Khaki ;
e.Row.Cells["Weight"].SelectedAppearance.BackColor = Color.Purple;
e.Row.Cells["Weight"].SelectedAppearance.BorderColor2 = Color.RoyalBlue;
e.Row.Cells["Weight"].ActiveAppearance.BackColor = Color.Green;
e.Row.Cells["Weight"].ActiveAppearance.BorderColor2 = Color.RoyalBlue;
e.Row.Appearance.BackColor = Color.Orange;
e.Row.Band.Override.SelectedCellAppearance.BackColor = Color.Lime;
e.Row.Band.Override.SelectedRowAppearance.BackColor = Color.Lavender;
e.Row.Band.Override.ActiveCellAppearance.BackColor = Color.Lime;
e.Row.Band.Override.ActiveRowAppearance.BackColor = Color.Lavender;
e.Row.Band.Override.ActiveRowAppearance.BackColor = Color.Coral;
e.Row.Band.Override.ActiveRowCellAppearance.BackColor = Color.Lime;
e.Row.Band.Override.ActiveRowCellAppearance.BackColor2 = Color.Lime;
e.Row.Band.Override.ActiveCellAppearance.BackColor2 = Color.Lavender;
Hello,
I have found a more efficient and direct solution to turn off highlighting. Please set the following two AppearancesEnabled properties to false in your application and please ignore my previous post.
this.ultraGrid1.DisplayLayout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False; this.ultraGrid1.DisplayLayout.Override.SelectedAppearancesEnabled = DefaultableBoolean.False;
this.ultraGrid1.DisplayLayout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False;
this.ultraGrid1.DisplayLayout.Override.SelectedAppearancesEnabled = DefaultableBoolean.False;
This worked a treat thank you very much
Another option is... when you set the Appearance on the Cell, you could also set the SelectedAppearance and/or ActiveAppearance on that same cell to the same appearance. that way the cell would appear the same regardless of whether it was selected or active.