Announcement

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

    Refresh ListGrid when underlying database table is changed

    I know this question has been asked before, "how do I refresh the listgrid?"
    Well, I have searched and searched these message forums, and one thread came close, but to no avail to me.

    I have a listgrid which gets data from the database via a JSON Datasource.
    This table was simply meant to display data. There are other applications which are deleting and inserting data to this underlying database table.
    Though the grid and datasource have not been changed, I want this grid to update and show additions and deletions. As I said, one thread said:
    grid.invalidateCache(); grid.fetchData();
    Well, that does NOT work since the documentation on "cache sync" says that the underlying resultset will be updated for a fetch, update, add, remove.
    Well, none of that is working.
    grid.data.invalidateCache(); can't be found, doesn't recognize .data.
    grid.getResultSet().invalidateCache() doesn't work either.

    The only thing that does seem to work is to refresh the whole page, and that is what I want to avoid.

    So, can I get another answer to this question?
    In the meantime, I'l keep digging for more information in the messages.

    Thanks!
    TomH

    #2
    grid.invalidateCache() works for me.

    I have an old php application that users insert data to and a separate SmartGWT one that displays a grid. When I call invalidateCache a fetch operation is issued and the data gets updated

    Comment

    Working...
    X