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

SelectedRow backcolor

Thread ID:





66501 Jul 30,2007 10:50 AM Jul 30,2007 03:18 PM Windows Forms 1
Tags: Grouping
Asked On July 30, 2007 10:50 AM

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


Replied On July 30, 2007 03:18 PM

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.

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