Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
197
UltraGrid.UpdateData() - rollback changes
posted

I want to do the following:

Call UpdateData() method to update the data manually.

Then I want prompt the user saying, "Save pending updates?"

If no, I want to cancel/rollback the UpdateData() call.  Can this be done?

 

Thanks

Parents
No Data
Reply
  • 69832
    Offline posted

    You can set the control's UpdateMode property to 'OnUpdate', handle BeforeRowDeactivate, and cache each of the rows that were modified by the user. Before calling UpdateData, show your prompt; if the user clicks ok, call UpdateData, otherwise iterate the cached rows and call CalcelUpdate on each of them.

Children