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

How to change color of selection without using alpha blending

Hi all,

please, tell me, how can i change the color of selection in grid control from black color to my custom color, when i select a row using
"GridControl.Selections.Add(GridRangeInfo.Row(rowIndex));"

I don't want to use the alpha blending selection, because it is decrease perfomance of grid.

Thanx,
Sergey.



1 Reply

AD Administrator Syncfusion Team April 4, 2008 11:24 PM UTC

Hi Sergey,

To Turnoff the AlphaBlendColor by using the AllowSelection property of the grid. Below is the code that show this task.

this.gridControl1.AllowSelection = this.gridControl1.AllowSelection ^ GridSelectionFlags.AlphaBlend;

You can draw over existing selected cells in the CellDrawn using the your new color. This should give you the same effect as selections. Check out this forum thread that uses this idea to color the current cell consistently with the other selections.

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=12812


Best regards,
Haneef


Loader.
Live Chat Icon For mobile
Up arrow icon