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.

Grid grouping control -office 2003 style

Thread ID:

Created:

Updated:

Platform:

Replies:

48872 Sep 5,2006 03:14 PM Sep 7,2006 02:27 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 5, 2006 03:14 PM

Hi.
I would like to ask how can i apply an Office 2003 style to a grid.grouping control?
I do not see the style property as in other controls (tabcontrol, mainframebarmanager etc.)

Thanks in advance
Stelios Halkiotis

Administrator [Syncfusion]
Replied On September 6, 2006 02:43 AM

Hi,

There is no built-in support for this. Right now you would have to set the BaseStyle property of the cell and custom draw to do this. Below is a code snippet.

//Add the Office2003 BaseStlye to the Grid....
GridTableBaseStyle Office2003BaseStyle = new GridTableBaseStyle("Office2003");
Office2003BaseStyle.Name = "Office2003";
Office2003BaseStyle.StyleInfo.Interior = new BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, new Color[]
{ Color.FromArgb(((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224))),
Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255))),
Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255))),
Color.Empty
});
this.gridGroupingControl1.BaseStyles.AddRange(new GridTableBaseStyle[] {Office2003BaseStyle});

//Set the HeaderStyle to Office2003 Base style.
this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.BaseStyle = "Office2003";
this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.BaseStyle = "Office2003";

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGC_modifiedForamt_27696cf9.zip

Best Regards,
Haneef

Note : If you want to draw the Office2003 selection, you can uncomment the TablecontrolPrepareViewStyleInfo event code.

Administrator [Syncfusion]
Replied On September 7, 2006 02:27 AM

Thanks!
It works OK.

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.

;