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
use the event BeforeRowUpdate.
private void ultraGrid1_BeforeRowUpdate(object sender, CancelableRowEventArgs e)
{
if(MessageBox.Show("","",MessageBoxButtons.YesNo)== System.Windows.Forms.DialogResult.No)
e.Cancel = true;
}
Brian Fallon"] 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.
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.
How would you cache the rows that were modified?