I want to clear not the whole binding, but partial.
The situation is :
I have a main screen, which has a dataGridView, which connected to
datasource by BindingSource object.
Also a sub screen called by the main screen, which has textBox object on it,
which also connected to the same bindSource object.
For simplicaty :
main screen = frmMain
data grid view - dgMain
BindingSource - bsMain (a local variable in each form - main and subform,
that has the same value for both).
sub screen = frmSubScreen
text box (on the sub-screen) - txtSubTestValue
On dgMain there are two rows (also two rows in the table of database).
First time I am on the first row of dgMain.
When clicking to show the frmSubScreen - subScreen has the current row
selected.
Now I am changing the txtSubTestValue, which is connected to a field.
.... Now I want to do cancel : I did bsMain.cancelEdit, but I know this
wrong - why ???
I am closing frmSubScreen, and return to frmMain.
If I check now the bsMain.current.Row.RowState = unchanged.
Now I am choosing the second row of dgMain,
and go again to the first row of dgMain (which I have changed, but did
:bsMain.cancelEdit).
But ...
Now unexpectedly bsMain.current.Row.RowState = modified - Why ???
And what is the best approach solving this problem ?
(For other situation, whether the original state is modified - It was
solved, by a function I have made. I only need to set the original value of
each column, which I keep it on an array, which holds all the related object
on screen, that has databinding on it).
Thanks