1 Reply Latest reply on May 19, 2006 9:09 AM by tonyhigham

    Asyncronous Component Issues

    Casperankinen Level 1
      Got this issue trying to create and populate a DataGrid and then print. Thing is that the DataGrid doesn't render immediately so I just get this blank patch in my print file.

      So I come up with a work around, a print preview, so the whole page has the opportunity to render before it's printed. Only problem is there's that much data I need to print multiple pages. So say I have 3 pages worth of content, I try to render 3 DataGrids each in a page template MC, which are all on stage at the same time just you toggle visibility pending which page you want to view. New issue is that it sends the memory through the roof as it attempts to render all the DataGrids at once, thus the flash player displays it's "some code has made the flash player run slowly" message.

      I'm that tired of coming up with work arounds for these extremely limited components, that I'll strongly consider writing my own DataGrid that will actually render when I tell it to and not crash the memory when it's called!

      But before all that I'd love to hear if other people have come up with way of getting around the above mentioned issue with the offending component.
        • 1. Re: Asyncronous Component Issues
          tonyhigham
          i've run into the same thing in different situations with my datagrids, and i'm getting ready to work on some of the same functionality that you are doing. if you need to add the page after the grid has rendered, try using the doLater method. i'm not 100% sure that it will solve your particular problem, but i'd say there's a good chance it can accomplish what you are looking for.

          myDG.doLater(this,"addDGPage")
          function addDGPage(){
          //add print page here
          }