Print FlexGrid with angular ng-template and pipes

Posted by: jbasilio on 12 December 2017, 3:27 am EST

    • Post Options:
    • Link

    Posted 12 December 2017, 3:27 am EST

    Hi:

    If you look at the following plunker

    http://plnkr.co/edit/X4K2urbi9wtFHiIFM2LX?p=preview

    I have a FlexGrid that I apply a max-height to. When the user clicks the ‘Print’ button, the max-height is changed to ‘none’ so that all rows will render. I then register for a wijmo event indicating the refresh will be completed, and invoke the window.print function of the browser.

    My problems are:

    1. IE works fine (!!) and chrome only prints 1 page of data. I’m continuing to look into this, but PLEASE TEST IN IE!
    2. In both browsers you can see that the columns that use ng-templates do NOT render. I believe this is due to the event indicating the refresh is completed firing prior to the data being run through the templates.

    My question is about #2 above. Is there a reliable event in FlexGrid that will fire when a grid is truly ‘ready’ and rendered? Without a reliable event, many things seem impossible, including printing via this mechanism.

    I believe if there was a reliable event to indicate the grid has been fully drawn, this print pattern could be used instead of PrintDocument, which causes all sorts of other difficulties with applying styles to the iframe generated, etc.

    Thanks.

    Jim

  • Posted 13 December 2017, 1:00 am EST

    Hi,

    We are investigating on this. We will update you soon.

    ~Manish

  • Posted 13 December 2017, 4:34 pm EST

    Hi Jim,

    We are sorry, we are unable to replicate the issue at our end with the latest IE and Chrome version. We found that it print only 31 records on both browsers. It seems because of virtualization.

    To print all records, you need to set virtualizationThreshold property to a large number. This may be affect the FlexGrid performance.

    this.worksheet.virtualizationThreshold=1000000;
    

    Please refer to the screenshots for browser version and image while printing:

    ~Manish

Need extra support?

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

Learn More

Forum Channels