Announcement

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

    ListGrid resultSet updated via updateCaches and expansion components

    What is the best method for being able to catch that a list grids data has been updated via a call up updateCaches, and get the expansion components data updated? Currently I have to know that the record was updated, and then close and open the expansion component manually to refresh the component.

    #2
    Since you are calling updateCaches(), you have the new Record data in hand and can use methods like RecordList.find() to locate the corresponding record in the grid.

    You can then use getCurrentExpansionComponent() to retrieve any currently visible expansion component and update it - no need to collapse and re-expand.

    Comment


      #3
      The canvas itself already listens for updates, and updates its forms values manager and list grid values, but the changes are not visible in the list grid expansion component, do I need to refresh the list grid itself?

      Comment


        #4
        You haven't mentioned anything about what the expansion component is.

        If the expansion component is something like a ListGrid or DynamicForm it's going to react to the change just like those components do when they are not used as expansionComponents.

        If it's something else, or is not set up for automatic cache sync (no DataSource, or a grid using a RecordList instead of a ResultSet, for example), yes you need to refresh it.

        Comment


          #5
          It is a VLayout containing a dynamic form and a ListGrid that is set to client only. They form is tied to a values manager i created. So when it sees a cache update it calls valuesManager.editRecord and grid.setData

          Comment


            #6
            OK.. Does that mean you still have a question?

            Comment


              #7
              no, calling markForRedraw resolved the issue

              Comment

              Working...
              X