Edit: More than a day. Still no answer! Is question not clear?
I have ComboBox bound to BindingSource which in turn is bound to Linq Table.
Also, ComboBox is filled from datasource which is a Linq Table.
I want to assign new value to one of properties of BindingSource.Current whenever user selects item in ComboBox. I understood from MSDN that I need to use SelectionChangeCommitted event of ComboBox.
Here is pseudo code:
myCB_SelectionChangeCommitted(...)
{
var val = myCB.SelectedValue; //I get selected value from user.
var q = bindingSource.Current as XYZ;
//Ommitted validation code to check if q is okay to work with
q.SomeProperty = NewCalculatedValue; //SomeProperty is bound to label
//After above line, myCB.SelectedValue is lost!
//It seems that this event fires **before** selected value
//is written to bound data source
}
Q: Do I have to use myCB.DataBindings[0].WriteValue(); ? Or is there a better way?
Thanks in advance.