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

virtualGrid and header BackColor

Thread ID:

Created:

Updated:

Platform:

Replies:

58190 Mar 20,2007 02:58 PM UTC Mar 21,2007 05:08 AM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 20, 2007 02:58 PM UTC

Hi,

I have a virtual grid. I am setting the HeaderBackColor to Custom color in PreviewViewStyleInfo.

protected override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
{
base.OnPrepareViewStyleInfo(e);
if (e.RowIndex == 0)
{
e.Style.BackColor = this.HeaderBackColor;
e.Style.TextColor = this.HeaderForeColor;
}

//This doesn't change header settings
if (_styler != null)
{
_styler.SetInfo(e.RowIndex, e.ColIndex, e.Style);
}
else
{
if (e.RowIndex != 0 && _hilightAlternateRows && e.RowIndex % 2 == 0)
e.Style.BackColor = this.HilightAlternateRowColor;
}

//To highlight the whole row when the current cell is being displayed.
if (this.Model.Selections.Count > 0 && e.RowIndex > this.Model.Rows.HeaderCount && e.ColIndex > this.Model.Cols.HeaderCount && this.CurrentCell.HasCurrentCellAt(e.RowIndex))
{
e.Style.Interior = new BrushInfo(SystemColors.Highlight);
e.Style.TextColor = SystemColors.HighlightText;
//e.Style.Font.Bold = true;
}
}

Only TextColor is having effect. The back color settings doen't have any effect. Kindly let me know how to set the header back color to the desired color. This color can be changed at runtime. Thanks.

Regards
kiran



Administrator [Syncfusion]
Replied On March 20, 2007 05:12 PM UTC

Hi Kiran,

Try setting the Style.Themed to false to see if that takes care of the issue.

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 21, 2007 05:08 AM UTC

It worked. Thanks!

Regards
Kiran

CONFIRMATION

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

;