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

Colors in a virtual grid

Thread ID:





66609 Jul 31,2007 03:14 PM UTC Jul 31,2007 03:37 PM UTC WinForms 2
Tags: GridControl
Lucia Diaconu
Asked On July 31, 2007 03:14 PM UTC


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?


Lucia Diaconu
Replied On 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 :-)


haneefm [Syncfusion]
Replied On 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,


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