Announcement

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

    Exporting and printing ListGrid paged client data

    I'm using SmartGWT EE Power 3.1p (build from Fev 01, 2013).

    My application has several databound paged ListGrid (I'm using JPADataSource), and I have to export these grid data to Excel/CSV. I'm using exportClientData, since data needs to be exported with the same formatting user can see on screen.

    But, as the grids are using PAGED fetch mode, when its exported only the data loaded in client cache are going to the exported file.

    When exporting, I want all data virtualy on the grid to be exported.

    Can anyone help on these issue?

    []s
    Heleno

    #2
    exportClientData() exports only loaded data.

    exportData() exports all data.

    Comment


      #3
      That is what I already understood.

      What I want to know is how to export all data (as exportData) but applying client formatting upon the data (as exportClientData). But note that I wouldn't like to change the grid fetch mode, because when on screen I don't want to load everything.

      (Sincerely, I think that exportClientData exporting only loaded data is pretty much useless since it's not what any user expects to get.)

      Comment


        #4
        You can force all data to be loaded by asking the ListGrid's ResultSet for all data (via getRange()).

        This will of course cause all data to be loaded to the browser, formatted and sent back to the server. With large datasets the export can be very slow, or even not complete (if the browser runs out of memory, for example).

        Use exportData() to export arbitrarily large datasets. This means you'll need to add logic to do your formatting server-side, of course.

        Comment

        Working...
        X