Colors in a virtual grid

Hi!

I have 2 questions regarding colors in a virtual grid:

1) I would like to have as row/column headers a simple gray color, not any skin. How could I do this?

2) I would like to color the text for some cells (the cells with null values, that display a minus sign (I would like a red minus sign :-) ) (I fill in this value in the QueryCellInfo event handler.

Can you give me a tip?

Thanks,
Lucia

2 Replies

LD Lucia Diaconu July 31, 2007 03:35 PM UTC

I found the needed property for the second question:
e.Style.TextColor = Color.Red;
So, only the first question remains :-)

Lucia


HA haneefm Syncfusion Team July 31, 2007 03:37 PM UTC

Hi Lucia,

In a virtual grid, if you want to change a header cell's backcolor, you have to do it by setting e.Style.BackColor ( also set e.Style.Themed property to false) in your QeryCellInfo handler.

void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 0 || e.ColIndex == 0)
{
e.Style.Themed = false;
e.Style.BackColor = SystemColors.GrayText;
}
}

Best regards,
Haneef

Loader.
Up arrow icon