Announcement

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

    Can I add a record client-side to a grid after fetching data from the server

    I want to add a record client-side after a fetch from the server has been performed. Is this possible? Thus the grids needs to show an extra record that is not fetched from the server. In SmartClient 12.0p.

    #2
    Yes. There are a lot of ways to do this, but the best approach depends on whether you need to be able to use data paging and whether/how the extra record is reconciled with respect to the server's data model that lacks that record.

    DataSource.updateCaches() lets you add records - see also ResultSet.updatePartialCache.

    You can also add extra data via DataSource.transformResponse().

    Comment


      #3
      I'm using data paging and only for the first page, it should add a virtual record. Maybe it's better to add it via the server.

      Comment


        #4
        It can be, otherwise you may need to reconcile server and client record numbering in a way that can become rather complex with sorting and filtering.

        Comment

        Working...
        X