How can I style aggregates row in Datagrid?
Hi,
Is there a way to use custom style with aggregates of columns? The cells in the grid use font-size:10px. I would like to use a smaller font-size than the one provided for the aggregates.
Thank you
SIGN IN To post a reply.
3 Replies
RS
Renjith Singh Rajendran
Syncfusion Team
November 24, 2021 12:49 PM UTC
Hi Yannick,
Greetings from Syncfusion support.
We suggest you to override the Grid’s footer styles to achieve this requirement. Please add the below styles in your application to customize the footer aggregate font size.
|
<style>
.e-grid .e-summarycell {
font-size:10px;
}
</style>
|
Please get back to us if you need further assistance.
Regards,
Renjith R
Hi, maybe I should open a new ticket for this issue.
When exporting to PDF, how can I set the aggregate header to be the same as the actual grid view on screen? The columns used (Elevation and Type et Couleur) are GridForeignColumns. At the moment, it displays the foreign key instead of the text value.
Screen
Thank you
RS
Renjith Singh Rajendran
Syncfusion Team
March 9, 2022 10:40 AM UTC
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
YA Yannick
- Nov 23, 2021 07:58 PM UTC
- Mar 9, 2022 10:40 AM UTC