Hello,
When I export a gridcontrol to pdf the grid don't have outline/contour.
I've try gridTmp.RowStyles[0].Borders.Top but have no effect (header?).
Is there a way to add a border/outline to main grid?
Thanks
Hi Dinis Ferreira,
Currently, we are analyzing your requirement of “How to add a border/outline to
grid Export to pdf”. So, we need two more business days to validate this. We
will validate and update you the details on or before September 27, 2022.
We appreciate your patience until then.
Regards,
Vijayarasan S
Hi Dinis Ferreira,
Your requirement to add a border/outline to grid Export to
pdf can be achieved by adding the top and left border for GridControl using
QueryCellInfo. Please refer to the below code snippet,
|
//Event Subscription gridControl1.QueryCellInfo += OnQueryCellInfo;
//Event customization private void OnQueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { //here set the Top border for Column Header if (e.RowIndex == 0) e.Style.Borders.Top = new GridBorder(GridBorderStyle.Solid); //here set the Left border for Row Header if (e.ColIndex == 0) e.Style.Borders.Left = new GridBorder(GridBorderStyle.Solid); } |
KB Link:
https://www.syncfusion.com/kb/418/how-to-change-the-gridcells-border-margins-styles-and-appearance-in-winforms-gridcontrol
https://www.syncfusion.com/kb/9509/how-to-enable-header-cell-borders-if-its-celltype-is-textbox
Regards,
Vijayarasan S
If this post is helpful, please consider Accepting it as the solution so that
other members can locate it more quickly.
Hi,
This works very good.
Thanks.
Hi Dinis Ferreira,
We are glad to know that the
reported problem has been resolved at your end. Please let us know if you have
any further queries on this. We are happy to help you😊.
Regards,
Vijayarasan S