Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    print preview does not show entire table

    Using SmartGwt version 2.5. GWT version 2.3. All browsers and browser versions.

    My Print Preview window is not showing all rows of the table. Before I invoke print preview, if I scroll to the end, I can see that the last row is there. When I invoke print preview and scroll to the end of the list, the last row is not there. This is related to how many rows are populated in the table, i.e. it only happens with a large number of rows.

    This problem can be easily duplicated by modifying the "Print Grid" example in the Showcase.

    1. Modify the country.data.xml file by copying all of <country> elements and pasting them to the end of the document 15 times.

    2. Go to the last <country> and modify the country name from Indonesia to ZZZZIndonesiaZZZZ (so you can easily identify the last element).

    3. Run the code and scroll to the bottom of the list. You should see the modified entry containing the ZZZZZs.

    4. Now invoke print preview and you will see that the last element is not there.

    Any assistance would be much appreciated.

    #2
    Printing will print the currently loaded rows. It cannot assume that it's safe to load all rows since this could be a very large number (eg millions). If you want to load more rows before printing, you can use ResultSet.getRange() to cause them to be loaded, then print when DataArrived fires.

    Comment


      #3
      Darn. Way over my head I'm afraid. However, I wonder if I accurately communicated my issue. You say that "printing will only print the currently loaded rows". Note that my problem isn't with regard to how many rows are printed. All the rows *are* getting printed. The problem is that all of the rows don't show up in the print preview window.

      Assuming that your answer will be as you previously answered, however, where do I get a handle on a result set to call getRange on? Also, how do I detect that "DataArrived" fires. Thanks for you help.

      Comment

      Working...
      X