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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

gdbg cell backcolor

Thread ID:

Created:

Updated:

Platform:

Replies:

63717 Jul 9,2007 06:13 AM UTC Jul 9,2007 06:01 PM UTC WinForms 1
loading
Tags: GridControl
John McLean
Asked On July 9, 2007 06:13 AM UTC

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

haneefm [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;