Hi Yannick,
We suspect that you are using CaptionTemplate to display custom group caption. If so, then at these cases, we suggest you to assign the CaptionTemplate content to args.Cell.Value inside the PdfGroupCaptionTemplateInfo event handler to achieve this requirement. Please refer and use the codes below,
<GridGroupSettings>
<CaptionTemplate>
@{
var order = (context as CaptionTemplateContext);
<div>This is a custom group template @order.Field - @order.Key</div>
}
</CaptionTemplate>
</GridGroupSettings>
<GridEvents PdfGroupCaptionTemplateInfo="@PdfGroupCaptionTemplateInfo" TValue="Order"></GridEvents>
public void PdfGroupCaptionTemplateInfo(PdfCaptionTemplateArgs args)
{
//assign the captionteplate content here
args.Cell.Value = "Custom template " + args.Field + "-" + args.Key.ToString();
}
|
We are also attaching a sample for your convenience, please download and refer the sample from the link below,
Please get back to us if you need further assistance.
Regards,
Renjith R