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. Image for the cookie policy date
close icon

Grid grouping control -office 2003 style

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

2 Replies

AD Administrator Syncfusion Team September 6, 2006 06:43 AM UTC

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.


AD Administrator Syncfusion Team September 7, 2006 06:27 AM UTC

Thanks!
It works OK.

Loader.
Live Chat Icon For mobile
Up arrow icon