Announcement

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

    createRecordComponent not called for changed record when refreshing ListGrid

    Hi,

    I have a ListGrid configured like this:

    Code:
            grid.setRecordComponentPoolingMode(RecordComponentPoolingMode.VIEWPORT);
    grid.setShowRecordComponents(true);
    grid.setShowRecordComponentsByCell(true);
    ...and I've overridden createRecordComponent() to draw various clickable icons in one of the grid cells depending on the record on that row.

    The ListGrid is bound to a data source (GWT-RPC).

    This all works fine on initial load and if I scroll the list up and down. However, if I manually refresh the contents of the list by calling

    Code:
    grid.invalidateCache()
    SmartGWT refreshes the records in the grid but doesn't call createRecordComponent() to update the custom cell elements. This is a problem because some rows may have changed and now need different icons drawn.

    Is there some way of forcing createRecordComponent() to be called again on the entire table? Or is invalidateCache() not the right way to force a reload of the table contents from the server?


    Apologies if this has been covered before but search on this forum appears to be entirely broken:

    Code:
    The following words are either very common, too long, or too short and were not included in your search : createRecordComponent

    #2
    I have the same problem, createRecordComponent or updateRecordComponent is not called.

    Comment


      #3
      (using SmartGWT 2.2 - forgot to mention before)

      I've managed to work around this for now by removing and recreating the ListGrid each time but it would be nice to have a more elegant fix.

      Comment


        #4
        A fix has been introduced that should take care of this - can you try this again with the latest nightly?

        Also, ensure that you implement showRecordComponent() as well as create/updateRecordComponent() if you're only applying components to certain columns.

        Comment


          #5
          Thanks. I'll give that a try.

          Comment


            #6
            Hey,

            Is there a workaround for this issue without upgrading to latest build?
            Any way to update the records manually after fetching the data?


            (btw, even with smart from source code I haven't seen that the grid is building the records again)


            Thanks.

            Comment


              #7
              Seems like invoking fetchData on the DS and setting the new data into the grid triggers a full rendering of each record,

              So this is my workaround for now :-)


              Still it could be nice to see that invalidateCache result a full records creation,

              p.s - It could also be nice if invalidateCache could be configured whether to show the 'loading data' message or not.

              How do I file a new request for this?



              Thanks !

              Comment

              Working...
              X