Announcement

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

    live grid not refreshing properly

    Hi.

    We are using smartGWTPro version 2.5 and IE9.

    We are using a ListGrid bound to a DataSource to display a user directory (paged data source on the server). The user directory can be sorted on first name or last name.

    When the sort order is changed, we are calling
    grid.setSort();
    grid.invalidateCache();

    In one of our cases, the client grid does not refresh correctly until all of the data is fetched from the server.

    Example:
    ========
    We have have 146 entries in the user directory on the server, and set the grid with a page size of 50.

    When we select sort by last name on the client menu, we call the setSort() and invalidateCache() on the grid. We see the call to the server to fetch the first 50 names sorted by last name. The data returned by the server is sorted by last name. The grid shows loading data, but the data is not in the correct order when it refreshes. As we scroll down the grid, we see the client issue another fetch to get the next 50 items. The grid still doesn't show the data in the right order. As we scroll further down, it does the fetch to get the last page. Then the grid updates and shows the data correctly sorted by last name.

    The interesting part is that when we switch the sort to 'first name', the grid behavior is the same for the server calls, BUT the client grid refreshes correctly on each call to the server. So the problem is only occurring when we try and sort on last name.

    #2
    If you're doing new development, you should probably use 3.1d (which is near release) or at least 3.0p. If you're forced to stick to 2.5, use the latest patched version (see smartclient.com/builds).

    As far as this particular issue, we haven't had a similar report - we'd need some means of reproducing the problem to look into it. However, do note that you would not normally call invalidateCache() after changing the sort direction (a new request is automatically made if needed). So you might be breaking things with this unexpected call.

    Comment


      #3
      The sort problem was on our server side and the issue is resolved now.

      We did remove the call to invalidateCache() on the sort change as that was not needed as you pointed out.

      Thanks for your help.

      Comment

      Working...
      X