Announcement

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

    Issue with ListGrid having 100+ records

    Using GWT 2.0, SmartGWT 2.4, IE 8, FF 3.6

    I've a header less ListGrid attached with DataSource and it can have loads of records and we can not use paging here. Every record/row in grid contains some information (text/image) which needs to be updated frequently and it also have rollover buttons.

    Issue is I'm using listGrid.invalidateCache() which calls Datasource's executeFetch() everytime to update the grid.
    But call to invalidateCache() seems to be costly and this approach has performance and rendering issues if there are loads of records.

    I was used this approach because if there is a change in one record then in most of the cases all other records information needs to be updated.
    So this updated the whole record in the grid.

    But now since if records are more then calling invalidateCache() flickers all the records and all the records are redrawn (if the grid is not grouped).

    I've looked at other possible solutions and found that updateCaches() could help. Also tried this but couldn't manage to use it properly. Seems like its broken or it may not serve this purpose.

    See the sample below of how I've tried to use it.
    Sample Code Snippet:-
    DSResponse response = new DSResponse();
    response.setAttribute("operationType", "update");
    response.setData(new Record[] {rec});
    listGrid.getDataSource().updateCaches(response);

    Please help.

    #2
    Looks right. What is updateCaches() not doing? Be sure you have a primary key defined on the data source or it won't know what record to update.

    Comment


      #3
      I'm able to ADD & UPDATE records using updateCaches() but records are not getting removed. Also all the details of records are not reflecting correctly.

      And I do grouping later on records disappears from grid and with grouping things are worst.

      Comment

      Working...
      X