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
170
ActiveRow appearance is transparent
posted

I have implemented a DrawFilter which causes my cells with errors to have their backcolor drawn as red. The cells which have errors should have red backgrounds with black text. However, it seems that the Active Row color is "laying over" the actual cell and is semi-transparent, causing my cells actual color to be reddish orange, and the text to be a grey orange.

How can I stop the ActiveRow's selection color from being drawn on top of my cell? And even on the non-error cells, I want my text to be black, not grey orange.

Here is my DrawElement implementation (executing upon the CellUIElements DrawPhase.BeforeDrawBackColor):

AppearanceData appearanceData = new AppearanceData() { BackColor = Color.Red };
drawParams.DrawBackColor(ref appearanceData, drawParams.Element.Rect, drawParams.InvalidRect, true);
return true;

To be clear, I don't want the active row appearance to be displayed at all within cells which have errors. I am on vs. 7.2 and don't have access to the ActiveAppearance and ActiveAppearancesEnabled properties.

Parents
No Data
Reply
  • 469350
    Offline posted

    Your grid must be using the SelectionOverlay feature. This works like Excel where the selected rows are drawn using a semi-transparent color which is drawn on top of the row.

    If you want a cell to be a specific color and not show the overlay, then you will have to turn this functionality off for the entire grid. There's no way to draw the overlay over some cells and not others.

    Look for SelectionOverlay in your code, or if you are loading an isl, then you will need to turn this off in the isl using the grid's component role.

Children