BorderLines Left and Top not shown for border cells

Posted by: Jose.Aguirre on 25 January 2021, 9:02 am EST

    • Post Options:
    • Link

    Posted 25 January 2021, 9:02 am EST - Updated 30 September 2022, 8:42 am EST

    Hello,

    I created my own project from your sample Spread WPF Explorer a did the following changes:

    this.gcSpreadSheet1.Workbook.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
                this.gcSpreadSheet1.Workbook.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
                this.gcSpreadSheet1.TabStripVisibility = Visibility.Collapsed;
    
                sheet.ColumnHeader.IsVisible = false;
                sheet.RowHeader.IsVisible = false;
    

    After selecting cells within the 3 rows and 3 columns, I set the border style and applied. The result is in the attached picture. As you can see, there are missing the border style shown for cells A1,A2,A3 (left borders) and A1,B1,C1 (top borders).

    This issue is of high value for our customers as they want to display the border styles as they have set. Please help!

  • Posted 28 January 2021, 6:47 am EST

    Hi,

    The spreadsheet control is designed to emulate Excel. When you assign border for a cell, next to the row header/ column header then border will not apply on the line which is shared by any header.

    You can check same behavior with MS Excel.

    If you try to set double border then only single line will be display.

    Hence, this is design behavior of spreadsheet.

    Thanks,

  • Posted 29 January 2021, 3:55 am EST - Updated 30 September 2022, 8:42 am EST

    Hello,

    we could live with the view not showing the left/top borders but the final result (on paper print or pdf) should be correct. But it is not!

    Below is the result when printing to pdf (note the very thin left/top lines):

    Below is the result when printing to paper printer (note that left/top lines are missing totally):

    And below is the result when printing similar edited cells to paper from Excel (note that the result is correct):

    Please fix this bug. Thanks!

  • Posted 1 February 2021, 12:15 am EST

    Hello,

    We are able to replicate the print issue and hence we are escalating the same to the concerned team as a bug request.

    We will update you as soon as we hear anything from our concerned team.

    Tracking Id : SPNET-15151 (for internal use only)

    Thanks.

  • Posted 21 June 2022, 7:05 am EST

    Hello, after a long time I would like to ask, is this bug already fixed? if yes, in which version?

    Thanks

  • Posted 21 June 2022, 11:47 am EST

    Hi Jose,

    Apologize for the delay.

    We are discussing with the development team and asked for the update on this. We will get back to you once we get any update from them.

    Best Regards,

    Nitin.

  • Posted 23 June 2022, 2:13 am EST

    Hi Jose,

    This issue is fixed and will be available in next release i.e., v15.2.20223.0 .

    ETA for the next release is end of July this year. So, you need to wait till release.

    Best Regards,

    Nitin.

  • Posted 27 September 2022, 9:31 am EST

    Hello,

    I tried the required version v15.2.20223.0 but it is not working yet. I attached a sample project.

    Please can you try there the “Print to paper” and “Print all 1” buttons?

    One is using the GcSpreadSheet.Print() method and the second is using PrintDialog.PrintDocument() approach.

    In both, the lef-top lines are not displayed properly.

    Spreadsheet_BorderStyle.zip

  • Posted 28 September 2022, 6:16 am EST - Updated 30 September 2022, 8:42 am EST

    Hi ,

    We have checked with version 15.2.20223.0 and getting expected Pdf.(refer Images)

    Print to Paper:

    Print All 1:

    Best Regards,

    Nitin

  • Posted 29 September 2022, 2:18 am EST - Updated 30 September 2022, 8:42 am EST

    Hi,

    The issue is that in the printout the e.g. double border is not present, only a simple line or nothing.



    The behavior in MS Excel is that the double border in the top left is present in the paper printout. According to you, the spreadsheet control is designed to emulate Excel. Printing to Pdf is not an issue.

  • Posted 30 September 2022, 8:25 am EST

    Hi Jose,

    Apologize for the misunderstanding. We have replicated this issue and discussing with the development team. Will get back to you once we have any update from them.

    Regards,

    Nitin

  • Posted 12 October 2022, 1:26 am EST

    Hi,

    As per the discussion with the devs, Left and top borders are out of printable range. We couldn’t solve this issue for the Print method, because it prints WPF elements with System.Windows.Documents.DynamicDocumentPaginator directly instead of drawing these borders in our code.

    As a workaround, you can print pdf files with Microsoft Edge WebView2.

    Please refer the attached sample for the same: SPNETPrintWithEdge.zip

    Best Regards,

    Nitin

  • Posted 5 June 2024, 8:29 am EST

    Hello guys,

    after a very long time, is Spreadsheet now able to print to pdf and paper showing the borders, as explained in previous comments? I wanted to check your example SPNETPrintWithEdge.zip but do not know how to reference WebView2 ((?)

  • Posted 6 June 2024, 2:41 am EST

    Hi,

    No, we couldn’t solve this issue for the Print method, because it prints WPF elements instead of drawing these borders in our code.

    In the previous comment, we shared a workaround to achieve this requirement using WebView2. You can test with the WebView2 which is working fine.

    In order to reference, you can install Microsoft.Web.WebView2 via NuGet package manager. Please refer here: https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.2584-prerelease

    Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels