In my grid, If I edit a cell, then click on another cell, the AfterRowUpdate event fires as I would expect. But if I edit a cell, then click a close button, the AfterRowUpdate event does not fire. How could I get the close button to do the same thing as clicking on another cell.
For example, if I change the text in cell A2 and then click on cell B2, then click my close button the AfterRowUpdate event fires and asks if I want to save changes. But if I change the text in cell A2 and then immediately click the close button the AfterRowUpdate event does not fire and my changes aren't saved.
Thanks,
Rich
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
ultraGrid1.UpdateData();
}
Thanks this worked. I made another post now but I'll tell you here in case you don't see it.
I want to do this update, then tell the user that changes exist and prompt them for saving
or discarding. If they don't want to save the changes, I want to rollback/cancel this UpdateData()
call.
Something like this:
DialogResult Dr = MessageBox.Show("Save Changes?")
if Dr = Windows.Forms.DialogResult.No
// Rollback / Cancel UpdateData()
Is that possible?
Thanks