Hello I am trying to add a background color to header cells when exporting to pdf. It does not appear to be doing anything. Attached is the code I am using and the output.
|
exportQueryCellInfo(args: any): void {
let backColor = this.grid.pdfExportModule.hexToRgb('#ff0000');
// here you can set the backgroundcolor for header
args.cell.style.backgroundBrush = new PdfSolidBrush(
new PdfColor(backColor.r, backColor.g, backColor.b)
);
}
|
Hi,
While this did allow for colors to show up I get a little weird behavior when trying to set different colors for different headers. Some header cells do not receive the background color. It works fine for excel but breaks in pdf. Below is code and output.
Thanks,
Charles
If it helps this is what the grid looks like on the site I am trying to get it to look as close as possible in pdf.
Hi,
I have attached the code I am using for your reference I do not get any error when exporting to pdf.
Thanks,
Charles
Hi,
I appreciate the update and am looking for forward to an update on the 17th.
Thanks,
Charles
Thank you for the Update!
Hi,
Upgrading does appear to fix the background color but the text color still is wrong. Some but not all Header cells text is red. They should all be red.
Thanks,
Charles
Awesome thank you for the update.
Hi Charles,
Thanks for your patience.
We are glad to announce that our Essential Studio 2022 Volume 1 release v20.1.0.47 is rolled out and is available for download under the following link.
In this release we have included the fix for the issue “Pdf grid header text color is not updated properly”.
https://www.syncfusion.com/feedback/32940/pdf-grid-header-text-color-is-not-updated-properly
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Pavithra S
I can confirm everything is working now thank you so much!
Hi Charles,
It is great to hear that everything is working now!
Please get back to us if you need any further assistance. We are always happy to assist you!
Regards,
Pavithra S