J
Jerry
I have a WinForms application that has a master DataSet with related
DataTables that various forms reference and bind to. I need to detect when
changes are made to the DataSet by a particular form so that the user can
choose to cancel or apply thoses changes (the Apply button is only enabled
after a change is detected, e.g. after they alter a value and then tab out
of the control). So I'm interesting in detecting changes made only to the
DataRows that that form's controls bind to for a specific BindingContext.
I've got it mostly working with one remaining issue. When there are multiple
controls on a form that reference the same DataRow, I have not been able to
detect a change to the row (e.g. when the user tabs to the next field)
unless the control gaining focus does not reference the same DataRow as the
control losing focus.
What I've learned from my experimenting with it is that the RowState is not
updated until I use EndEdit for the row. However, this only works after the
"row loses focus." As long as the next control still binds to the same
DataRow the DataRowVersion.Proposed doesn't exist and the EndEdit doesn't do
any good.
Please advise.
DataTables that various forms reference and bind to. I need to detect when
changes are made to the DataSet by a particular form so that the user can
choose to cancel or apply thoses changes (the Apply button is only enabled
after a change is detected, e.g. after they alter a value and then tab out
of the control). So I'm interesting in detecting changes made only to the
DataRows that that form's controls bind to for a specific BindingContext.
I've got it mostly working with one remaining issue. When there are multiple
controls on a form that reference the same DataRow, I have not been able to
detect a change to the row (e.g. when the user tabs to the next field)
unless the control gaining focus does not reference the same DataRow as the
control losing focus.
What I've learned from my experimenting with it is that the RowState is not
updated until I use EndEdit for the row. However, this only works after the
"row loses focus." As long as the next control still binds to the same
DataRow the DataRowVersion.Proposed doesn't exist and the EndEdit doesn't do
any good.
Please advise.