This is a migrated thread and some comments may be shown as answers.

Cell Borders Not Appearing on a Grid Exported To PDF

1 Answer 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rich Reuter
Top achievements
Rank 1
Rich Reuter asked on 28 Apr 2015, 01:57 PM

I'm attempting to export a grid with cellborders set but I am not able to apply the formatting.  All of my other formatting changes (font, background/foreground colors) work just fine.  Is there another way I should be attempting to set the borders?

 

// grid = RadGridView
grid.ElementExportingToDocument += GridOnElementExportingToDocument;
....
 
private void GridOnElementExportingToDocument(object sender, GridViewElementExportingToDocumentEventArgs e)
{
 
    GridViewDocumentVisualExportParameters visualParams  = ((GridViewDocumentVisualExportParameters)e.VisualParameters);
    var border = new CellBorder(CellBorderStyle.Thick, new ThemableColor(Colors.Black));
 
    visualParams.Style = new CellSelectionStyle
    {
        FontSize = GatwickPrintSettings.BodyCellFontSize,
        FontFamily = new ThemableFontFamily(GatwickPrintSettings.FontFamily),
        CellBorders = new CellBorders(border), // !! Has no effect
        VerticalAlignment = RadVerticalAlignment.Center
    };
   ....
}

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 May 2015, 08:41 AM
Hello Rich ,

Thank you for your feedback.

I managed to reproduce the issue and I am logging it in our Feedback Portal as a Bug Report. You can track its progress here: CellBorders are not applied when setting a Style for GridViewDocumentVisualExportParameters.

​​
We have also updated your Telerik points as a gratitude for reporting this issue.

Best Regards,
Stefan
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Rich Reuter
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or