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.
Up arrow icon