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
535
Cell Appearance attrs not sticking
posted

I set a cells background difference once modified with this code in UpdateCellEvent:

       e.Cell.Appearance.BackColor = System.Drawing.Color.LightSteelBlue;
       e.Cell.SelectedAppearance.BackColor = System.Drawing.Color.LightSteelBlue;

However when I select the row, (or another cell in the row) it redraws it in white.  I would have assumed that the cell setting would override the row default?

     this.ultraGrid1.DisplayLayout.Override.SelectedCellAppearance = appearance44;

Peter

Parents
  • 45049
    Verified Answer
    posted

    What you're likely seeing is likely the ActiveRowApperance being applied to the cell, since it applies when you click on another cell in the same row.  This is expected; ActiveRowAppearance takes precedence over the overall SelectedCellAppearance, as well as the cell's Appearance and SelectedAppearance.

    If it's not the ActiveRowAppearance, it may be that the SelectedRowAppearance is being applied instead.  Selecting the row containing a cell isn't the same as selecting cells individually, so appearances may be resolved in a different manner.

    The following forum thread describes an approach that may help in this situation, by using a draw filter:
    http://forums.infragistics.com/forums/t/992.aspx

Reply Children
No Data