I want to use LoadingRowGroup event in SilverLight DataGrid to display a group summary.
I have an event:
void dataGrid1_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e)
{
// e.RowGroupHeader
}
but I don’t know how to use e.RowGroupHeader to set group header value. Maybe I should use e.RowGroupHeader.Template, but I don’t know how to set a template by code.
Since nobody has helped me, I found a solution by myself 🙂
In fact there are two ways:
1) by using LoadingRowGroup event in DataGrid:
2) By setting a Style of DataGridRowGroupHeader:
The (2) way is better for static elements. But the first one can be used when you want to generate headers in a more dynamic way.