I am using a pretty old copy of UltraWinGrid. It is v6.3.20063.53
My grid is basically configured to be readonly and single row select. I am now trying to change the grid so that it never displays blue over the active or selected row. I want to let the user select single rows but I just don't want to see any feedback on what row is active or selected. I found on the web someone suggesting this would do the job in the grid InitializeLayout() routine
UltraGrid ultraGrid = (UltraGrid)sender;
UltraGridLayout displayLayout = ultraGrid.DisplayLayout;//Make selected row color to transparantdisplayLayout.SelectionOverlayColor = SystemColors.Highlight;//Remove selected and active appearanceband0.Override.SelectedAppearancesEnabled = DefaultableBoolean.False;band0.Override.ActiveAppearancesEnabled = DefaultableBoolean.False;
Alas, I do not see SelectionOverlayColor, SelectedAppearancesEnabled or ActiveAppearancesEnabled properties in my version of the grid. Can I do this in some other way ? Seems like a pretty simple thing to do but most things I have tried have not worked so far.
Hello,
Please try the following code for your version and let me know if it works for you:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
e.Layout.Override.SelectedRowAppearance = e.Layout.Override.CellAppearance;
e.Layout.Override.ActiveRowCellAppearance.BackColor = Color.White;
e.Layout.Override.ActiveRowCellAppearance.ForeColor = Color.Black;
e.Layout.Override.ActiveCellAppearance = e.Layout.Override.CellAppearance;
}
Hi Boris,
I would like to highlight rows as they are selected with different colors.
The Active Row Appearance does not let the user see the custom color of the active row. The user can see the color of the row once they move off, but it may confuse the user because they do not see the color when they select the row.
Could you please post the code for turning Active Row Appearance OFF.
Thank you.
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.