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
385
How to custom columns contains in select/active row
posted

Hi

How to implement:  The first column of my grid is a image column and when I select a row or a row is active, I don't want the first column to be highlighted ( blue forground color box). Either removing the first column from the active row or customing the display of highlight.  Could anyone provide any method of how to achieve this?

 

 

  • 469350
    Offline posted

    Hi,

    What you could do is use the InitializeRow event to set the SelectedAppearance on the cell in the image column. You would apply an appearance with the default BackColor (probably SystemColors.Window) so that when the cell is selected it looks the same as when it is not selected.

    Oh, and you may want to set the ActiveAppearance on the cell, as well.

    To do this most efficiently, I would just define the Appearance once and assign the same appearance object to each cell's SelectedAppearance and ActiveAppearance.