The snapshot is a nice feature to rollback changes. I am trying to understand when to use it and when to use refresh row. For example if you have a panel with a grid and a panel for editing a record. When the user makes changes and wants to cancel the transaction, I would think you would just use refresh row api call. I can see the best use of the snapshot is when you let people edit in a grid and they can make multiple changes to multiple rows. Cancel those and a snapshot comes in handy. But I guess you could also just re-query the grid although you would loose you position in the dataset. What other scenarios would using the snapshot be useful. |
Hi Raymond, As you mentioned, we always recommend the refresh row API call for a single row refresh. In multiple rows refresh case, if the number of rows existing in your datasource is small (<100-200), you can retrieve the primary key value of the current row(to keep the position in the dataset), re-query the grid and then use In multiple rows refresh case, if the number of rows existing in your datasource is huge and the number of the edited rows is small, you can use In our experience, the best use of the snapshot is when you need a savepoint similar sturucture, which is a very rare case. To cancel the changes, we often use refresh API or the re-query options (or Hope this helps, Thanks Ibrahim that is a very helpful explanation.
(10 Mar '14, 09:03)
Raymond
|