Announcement

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

    12.0p: API to load all matching rows of a ListGrid before calling exportClientData()

    Hi Isomorphic,

    I'm looking for the correct way to load all matching rows in a normally paged grid in order to export them then with exportClientData().
    I know that this might result in big network and CPU load, but here the user know what they are doing.

    I think that ResultSet.getLength() <> ResultSet.getAllCachedRows().getLength() is not correct in filtered ListGrids.
    I did see this API ResultSet.allMatchingRowsCached() though, which should do this for me.
    Next question then is if there is the possibility to get the ListGrid to load all remaining rows. I did not find an API on either ListGrid not ResultSet for this.
    I could do
    • myListGrid.fetchData(myListGrid.getCriteria())
    • myListGrid.getResultSet().getRange(0, 99999999999)
    Do you suggest any of these approaches or is there a better way to do this?

    Best regards
    Blama

    #2
    If you have not yet fetched you can set dataFetchMode:"basic". If you have already fetched, getResultSet().getRange() is correct, but there's no need to set some giant number since you can just call resultSet.getLength().

    Comment


      #3
      Hi Isomorphic,

      thanks, I'm using getResultSet().getRange(0, getResultSet().getLength()) now.
      With ResultSet.allMatchingRowsCached() instead of my own faulty mechanism it is now working as expected.

      Best regards
      Blama

      Comment

      Working...
      X