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

SelectionBackColor

Thread ID:

Created:

Updated:

Platform:

Replies:

6290 Aug 7,2003 01:41 PM UTC Jul 17,2004 09:33 AM UTC WinForms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 7, 2003 01:41 PM UTC

Sorry, I'm still new to essential grid. But what is the equivalent to SelectionBackColor in essential grid?

Administrator [Syncfusion]
Replied On August 7, 2003 03:01 PM UTC

grid.AlphaBlendSelectionColor.

Administrator [Syncfusion]
Replied On July 17, 2004 04:11 AM UTC

>grid.AlphaBlendSelectionColor. When try to set this property i couldn''t get the exact color. It is giving different color. Can you please help me on this? Thanks

Administrator [Syncfusion]
Replied On July 17, 2004 06:11 AM UTC

We are using alphablending (the A part of the Color.FromArgb) to avoid having to redraw all teh cells. When this value is less than 255, the underlying screen will bleed through so you can see it. The less the value, the more transparent the look. The reason to do this is that the selection then can be drawn by just filling a rectangle with this color. If you actually want the background to have a non-blended color, then you would have to draw the contents of every cell with the desired backcolor. This would avoid the blending fade that you are commenting on. If you want this, you can do it by setting the alpha part of the selection color to 0 (so it does not show). Then you would handle PrepareViewStyleInfo and set the backcolor you want if teh cell is selected. This thread shows how you can do this. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=13587

Rabeek
Replied On July 17, 2004 08:38 AM UTC

Thanks Clay Burch, for your valuable reply. And I have posted new message of doubt on the Header Caption. Can you please help me on that? Regards Rabeek >We are using alphablending (the A part of the Color.FromArgb) to avoid having to redraw all teh cells. > >When this value is less than 255, the underlying screen will bleed through so you can see it. The less the value, the more transparent the look. The reason to do this is that the selection then can be drawn by just filling a rectangle with this color. > >If you actually want the background to have a non-blended color, then you would have to draw the contents of every cell with the desired backcolor. This would avoid the blending fade that you are commenting on. If you want this, you can do it by setting the alpha part of the selection color to 0 (so it does not show). Then you would handle PrepareViewStyleInfo and set the backcolor you want if teh cell is selected. > >This thread shows how you can do this. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=13587

Rabeek
Replied On July 17, 2004 08:42 AM UTC

One more doubt on this... Is any property to set the forecolor of the selected rows? I searched on that, but i am not able to find that. Can you help me on this...? Thanks

Administrator [Syncfusion]
Replied On July 17, 2004 09:33 AM UTC

In PrepareViewStyleInfo, in addition to setting e.Style.BackColor on the selected cells, you can also set e.Style.TextColor (as well as any other GrridStyleInfo property that you might want to set to affect the cell appearance like e.Style.Font.Bold maybe).

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

;