Hello,
I would like to change the style of GroupHeaderRow and GroupFooterRow for each group in ElementExportingToDocument event.
Could you help me to to this please ?
Thanks a lot
Regards.
ie :
private
void
ElementExportingToDocument(
object
sender, GridViewElementExportingToDocumentEventArgs e)
{
if
(e.Element == ExportElement.GroupHeaderRow )
{
//-----------------------------------------------------
// How to know here in witch group I am ??
//-----------------------------------------------------
Color MyColorGroup = ColorSwitchGroup(thisgroup);
(e.VisualParameters
as
GridViewDocumentVisualExportParameters).Style =
new
CellSelectionStyle()
{
FontSize = UnitHelper.PointToDip(11),
IsBold =
true
,
Fill =
new
PatternFill(PatternType.Solid, MyColorGroup ,MyColorGroup ),
CellBorders = CellBorders.CreateOutline(
new
CellBorder(CellBorderStyle.Thin,
new
ThemableColor(Colors.Black)))
};
}
else
if
(e.Element == ExportElement.GroupFooterRow)
{
//-----------------------------------------------------
// How to know here in witch group I am ??
//-----------------------------------------------------
Color MyColorGroup = ColorSwitchGroup(thisgroup);
(e.VisualParameters
as
GridViewDocumentVisualExportParameters).Style =
new
CellSelectionStyle()
{
FontSize = UnitHelper.PointToDip(11),
IsBold =
true
,
Fill =
new
PatternFill(PatternType.Solid, MyColorGroup , MyColorGroup ),
CellBorders = CellBorders.CreateOutline(
new
CellBorder(CellBorderStyle.Thin,
new
ThemableColor(Colors.Black)))
};
}
}