Hi,
We have a grid with a Add new row" at the bottom.
When user exit from this row we want to display a warning (done with MessageBox), then we want to exit completly from edit mode end discard user changes.
We used "RowExitingEditMod" event.
We tried calling "ExitEditMode()" method from the grid, but unfortunately this fire again and again the same "RowExitingEditMod" event.
(see code below)
Do you have a solution for this ?
Thanks.
Alain.
The event being raised is by design. In this case you would probably want to add a form level variable, _iCalledEndEdit which you would set to true prior to calling exit edit mode. Then add a check to skip over your call in the event handler.
Hi Darrell,
I already try that and get the following error when exiting "RowExitingEditMode" for the second time :
ExceptionObject = {System.NullReferenceException: object reference not set to an instance of an object. à Infragistics.Controls.Grids.XamGrid.ExitEditModeInternal(Boolean cancel) à Infragistics.Controls.Grids.XamGrid.ExitEditMode(Boolean cancel)
Regards.