This samples demonstrates how to customize the layout of groups through the designer. The sample is built with a hierarchical data set with two tables customized at design time.
Features:
The Appearance.GroupCaptionCell property on the grid grouping control can be used to format the display of the group-caption cells.
This property provides the GridTableCellStyleInfo object with cell settings such as cell background color, text color, value, and font for group-caption cells.
Properties such as Appearance.GroupHeaderRowHeaderCell and Appearance.GroupCaptionPlusMinusCell can be used to set row header styles and plus-minus cells in the group caption.
Here is a sample code to apply group level styles.
// Formatting group caption cell. this.gridGroupingControl1.Appearance.GroupCaptionCell.Interior = new Syncfusion.Drawing.BrushInfo (Syncfusion.Drawing.GradientStyle.ForwardDiagonal, System.Drawing.SystemColors.Window, System.Drawing.Color.MediumAquamarine); this.gridGroupingControl1.Appearance.GroupCaptionCell.TextColor = System.Drawing.Color.Brown; this.gridGroupingControl1.Appearance.GroupCaptionCell.Themed = false; // Formatting PlusMinus cells in group caption. this.gridGroupingControl1.Appearance.GroupCaptionPlusMinusCell.Interior = new Syncfusion.Drawing.BrushInfo (Syncfusion.Drawing.GradientStyle.PathRectangle, System.Drawing.SystemColors.Window,System.Drawing.Color.Pink); this.gridGroupingControl1.Appearance.GroupCaptionPlusMinusCell.Themed = true; // Formatting group caption row header cells. this.gridGroupingControl1.Appearance.GroupCaptionRowHeaderCell.CellTipText = "GroupCaptionRowHeader"; this.gridGroupingControl1.Appearance.GroupCaptionRowHeaderCell.Interior = new Syncfusion.Drawing.BrushInfo (Syncfusion.Drawing.GradientStyle.BackwardDiagonal, System.Drawing.SystemColors.Window, System.Drawing.Color.DarkOrange); this.gridGroupingControl1.Appearance.GroupCaptionRowHeaderCell.Themed = false;