We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

gdbg cell backcolor

Hi there

I have added a handler to the PrepareViewStyleInfo event for changing the back color of cells within the grid. When the cell I want to change is found, I can set the backcolor like so:

e.Style.BackColor = Color.Red

This works fine, however we are not using standard colors with our application, so when I set to a non-standard color, e.g:

e.Style.BackColor = Color.FromArgb(16776960)

The backcolor is only changed when the cell is selected. What have I missed?

Cheers

J

1 Reply

HA haneefm Syncfusion Team July 9, 2007 06:01 PM UTC

Hi J,

The reason this is happening is the the control in the cell is derived from TextBoxBase, and this WindowsForms control does not accept Transparent colors with its default settings. But you can set the alphablend value with

style.Interior = new BrushInfo(Color.FromArgb(alphaValue, color));

That will make cell have a transparent effect and display a image behind the grid.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon