I assumed that the CurrencyManager's ItemChanged event could be used to
identify that some part of a row has changed and allow for the opportunity to
ask the user if they want to keep the change (or not) prior to changing the
CurrencyManager's position.
I have found the that ItemChanged event is raised if the data in the current
position is changed and then the position is changed. When the ItemChanged
event is fired, I can ask the user if they want to commit the changed or
rollback. However, I find that if I do rollback (or reject the changes)
another ItemChanged event is fired right on top of the last one, causing the
same prompt "keep changes..." to be shown again.
I tried using Suspen/Resume binding while reinstating the original data, but
seem to have other errors occur instead.
What's the correct way to use the ItemChanged event so that it doesn't get
re-fired after a rollback or reject changes?
Michael

Signature
Michael Hockstein
"Jeffrey Tan[MSFT]" - 28 Nov 2005 08:16 GMT
Hi Michael,
Thanks for your post.
Databinding has limited validtion support in .Net1.1. We usually do the
validating in UI side. For example, when doing databinding with DataGrid,
we can use DataGrid.CurrentCellChanged event to do the cell by cell
validating, for more information, please refer to the link below:
"5.20 How can I do cell by cell validation in a datagrid"
http://www.syncfusion.com/faq/windowsforms/search/773.aspx
In .Net2.0, we can use DataGridView's build-in CellValidating event to do
this, please refer to "Validating input" section in the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/h
tml/vs05a9.asp
Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.