SelectedRow backcolor

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

Thanks

1 Reply

ZA zach 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?

Loader.
Up arrow icon