Announcement

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

    Force a fetchData for a grouped ListGrid or a TileGrid

    Hello,

    to load data into my ListGrid, I use a ListGrid.fetchData with a DSCallback and with requestProperties.
    void ListGrid.filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)

    How can force an update via this fetch call, when the criteria is not changed. Calling invalidateCache make a refetch to the server but do not help, because the callback isn't called und the requestProperties will not be used.

    The invalidateCache for a grouped ListGrid call a regroup(), which make the refetch.
    The invalidateCache for a TileGrid call a requestVisibleRows(), which make the refetch.

    The only thing I have found is not to call invalidateCache and reset the ResultSet of the ListGrid:
    ResultSet oldResultSet = getOriginalResultSet();
    if (oldResultSet != null)
    {
    setData(new RecordList());
    oldResultSet.destroy();
    }

    Is there any other, smarter way to force an reload.

    Regards

    Peter

    #2
    After invalidateCache(), DataArrived fires.

    There is also a refreshData() call available in the latest version.

    Comment


      #3
      But there is no way to use requestProperties on refresh via invalidateCache() or refreshData() (Version 5.1)

      Peter

      Comment


        #4
        What requestProperties are you setting? invalidateCache() should be sending a request using the same requestProperties as the original fetchData().

        Also, if you call fetchData() after setting the data to an empty list (new RecordList(), as you had above), that's an opportunity to pass revised requestProperties.

        Comment

        Working...
        X