|Please note that we have introduced a new GroupRenderMode="Flat". In that case the GroupRowStyle should target GroupHeaderRow(similar to GridViewGroupRow). Please check this help article for details.|
The RadGridView exposes the GroupRowStyle property of type Style. It is applied to the GridViewGroupRow controls inside the RadGridView.
You have two options:
- To create an empty style and set it up on your own.
- To copy the default styles of the control and modify it.
This topic will show you how to perform the second one.
Modifying the Default Style
To copy the default style, load your project in Expression Blend and open the User Control that holds the RadGridView. In the 'Objects and Timeline' pane select the RadGridView you want to style. From the menu choose Object -> Edit Additional Styles -> GroupRowStyle -> Edit a Copy. You will be prompted for the name of the style and where to be placed.
|If you choose to define the style in Application, it would be available for the entire application. This allows you to define a style only once and then reuse it where needed.|
After clicking 'OK', Expression Blend will generate the default style of the GridViewGroupRow control in the Resources section of your User Control. The properties available for the style will be loaded in the 'Properties' pane and you will be able to modify their default values. You can also edit the generated XAML in the XAML View or in Visual Studio.
- ControlOuterBorder - a brush that represents the color of the outer border of the GridViewGroupRow.
- ControlInnerBorder - a brush that represents the color of the inner border of the GridViewGroupRow.
- GridView_GroupRowIndicator - a brush that represents the color of the expander icon.
- GridViewGroupToggleButtonTemplate - the ControlTemplate, applied to the TggleButton element of the GridViewGroupRow.
- GridViewGroupToggleButtonStyle - the Style, applied to the TggleButton element of the GridViewGroupRow.
- GridView_RowIndicatorCellBackground - a brush that represents the background of the indicator cell.
- GridViewGroupRowTemplate - the ControlTemplate, applied to the GridViewGroupRow.
- GroupHeaderTemplate - a DataTemplate applied to the Group Row's header.
- GridView_GridRowBackground - a brush that represents the background color of the GridViewGroupRow.
- GridViewGroupRowStyle - the Style applied to the GridViewGroupRow.
In order to fully style the grouping appearance you have to also modify the styles for the GridViewRow, the GridViewGroupFooterRow and the IndentPresenter (GridViewIndentCell too).