Custom printable format for Wijmo Flexgrid

Posted by: nilesh_nichal on 30 August 2023, 11:28 pm EST

  • Posted 30 August 2023, 11:28 pm EST - Updated 30 August 2023, 11:36 pm EST

    Hi Team,

    We are using Flexgrid component with dynamic number of columns and some of columns have long length data. In such case browser renders grid with horizontal and vertical scrollbars and long length content gets truncated and adds ellipsis which is expected behavior.

    Our requirement: We need to use window print function i.e. ctrl + P to print page. While using this function we need to convert grid in such a format that grid will show all data such that long length data should be visible with whole content.

    We have gone through https://www.grapecity.com/wijmo/demos/Grid/ImportExportPrint/Print/angular.

    But in our case we want to strictly use ctrl + P option in which we are facing the above mentioned issues.

    Can you please help us for the same. Also attached screenshots to brief our issue.

    Grid on Browser



    Grid on print

  • Posted 31 August 2023, 5:47 pm EST

    Hi Nilesh,

    Sorry, but it wouldn’t be possible to change the browser’s default print function to print entire grid data. However, you can work around it either by using Wijmo’s printDocument on the key press of ‘Ctrl + P’ on the browsers, or you use pdf export which gives a variety of customizing properties and methods. You need to create a blob URL instance of the document and open that blob using a window.open() method, then you can directly print that document easily. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-sgjsyd?file=src%2Fapp%2Fapp.component.ts

    Let us know if it works for you.

    Regards

Need extra support?

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

Learn More

Forum Channels