Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
How can I disable Active Row and/or Selected Row feedback on an v6.3 UltraWinGrid ?
posted

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 transparant
displayLayout.SelectionOverlayColor = SystemColors.Highlight;
//Remove selected and active appearance
band0.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.

Parents
No Data
Reply
  • 71886
    Offline posted

    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;

             }

Children