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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedRow backcolor

Thread ID:





66501 Jul 30,2007 02:50 PM UTC Jul 30,2007 07:18 PM UTC WinForms 1
Tags: Grouping
Asked On July 30, 2007 02:50 PM UTC

When I have multiple rows selected in a grid, how can each of them have a different background color?


Replied On July 30, 2007 07:18 PM UTC

OK - I've done the following to get my row to have a background color when selected.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.DisplayElement.GetRecord() != null)
if (e.TableCellIdentity.Table.SelectedRecords.Contains(e.TableCellIdentity.DisplayElement.GetRecord()))
e.Style.BackColor = Color.Purple;
//purple for testing only, will be different colors in real usage

I set the SelectionBackColor to Color.Transparent but only the selected cell shows up as purple. I think this is because the grid can't handle the transparency.

Is there a way around this?


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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