New to Telerik UI for WPF? Start a free 30-day trial
Format Group Header Cell Content
Updated on Oct 1, 2025
By handling the ElementExportingToDocument of the RadGridView control, you can specify a custom format for the exported group header cells. For example, you can export the captions of the aggregate results with their formatted value (based on the ResultFormatString of the function) as well as the number of items in the group.
Example 1: Custom Group Header Cell Export Content
C#
private void Grid_ElementExportingToDocument(object sender, GridViewElementExportingToDocumentEventArgs e)
{
if (e.Element == ExportElement.GroupHeaderCell)
{
var group = e.DataContext as QueryableCollectionViewGroup;
string value = group.Key.ToString() + " (" + group.ItemCount + " items)" + new String(' ', 4);
foreach (var result in group.AggregateResults)
{
value += result.Caption + " " + result.FormattedValue + new String(' ', 4);
}
e.Value = value;
}
}Custom Group Header Cell Export Content
