Announcement

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

    listgrid foreign key fields sometimes not being resolved

    SmartClient Version: SNAPSHOT_v8.3d_2012-09-27/PowerEdition Deployment (built 2012-09-27)
    -------------------------------

    I have a ListGrid with a foreign key field.This field is being resolved correctly by using field.setOptionDataSource().
    Now I am changing data of the underlying table and want the grid to be refreshed (to show that data).
    So what I do is
    Code:
    grid.invalidateCache();
    grid.fetchData()
    Problem: When adding a large amount of new data, the foreign key field is not updated correctly anymore. Instead of the displayName I only see the ID.
    If I just add a few records and update the grid then, it is being resolved correctly.

    Anything I am doing wrong here or a bug?

    Thanks!

    #2
    could you please tell me the correct way of refreshing a grid 'manually' when the underlying table data has been changed?

    Comment


      #3
      Ok, The initial problem seems to be caused by the cache invalidation.
      The whole problem can be solved by using the following code for ListGrid refreshing:

      Code:
      grid.setRecords(new ListGridRecord[0]);
      grid.fetchData();
      Cheers

      Comment

      Working...
      X