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.

Setting interior for groupedgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

33868 Aug 28,2005 07:44 PM Aug 28,2005 08:04 PM Windows Forms 1
loading
Tags: GridControl
Damien Sawyer
Asked On August 28, 2005 07:44 PM

Hi - I need to format the colum header cells of in a grouped grid to have a gradient style. I have tried the following code (modified from code which I used in the bound grid) however it doesn''t seem to work. Strangely enough, the ''bold'' statement works fine, but the interior setting is ignored. private void grItems_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e) { if (e.Inner.ColIndex==0) { e.Inner.Style.Interior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Horizontal, Color.FromArgb(203, 199, 184), Color.FromArgb(238, 234, 216)); // This does not work } if (e.Inner.RowIndex==1) { e.Inner.Style.Font.Bold = true; // This works... e.Inner.Style.Interior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Horizontal, Color.FromArgb(203, 199, 184), Color.FromArgb(238, 234, 216)); // This does not work } } I then tried to use the ''preview and edit'' feature (which is fantastic by the way!). I played with tabledescriptor.appearance.ColumnHeaderCell.interior however to no avail. I then tried anyheadercell as well... Could someone please tell me what I''m doing wrong? Thanks very much in advance, Damien Sawyer

Administrator [Syncfusion]
Replied On August 28, 2005 08:04 PM

Are you seeing themed header cells? If so, that is why setting backcolor is not working. Try also setting e.Inner.Style.Themed = false. Or, you can try this code in Form.Load. this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Interior = new BrushInfo(GradientStyle.Vertical, Color.Red, Color.Blue); this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Themed = false;

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.

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.

;