Hi,
I'm having a problem databinding ComboBoxes to a TypedList.
I fire up two WinForms of the same type, each looking at a different instantiation of the same Entity.
One property of the entity is changed using a ComboBox on the WinForm that points back to a single TypedList.
Note that the ComboBoxes on both forms points back to the SAME TypedList.
When I select a different value on the ComboBox, the value in BOTH WinForms changes.
I thought that Currency Management was per WinForm, but this doesn't seem to be the case; it looks like somehow the TypedList is doing the Currency Managing, or at least only allowing one Current item.
Or, is it due to the update modes I've selected on the last few lines of code (see below)?
I have tried to get changes to propagate both ways as fast as possible as I had some trouble with changes to the Entity not reflecting up to the WinForm control.
(Although to be fair this was with a TextBox, not a ComboBox).
comboBox.DataBindings.Clear();
comboBox.DisplayMember = displayMember;
comboBox.ValueMember = valueMember;
comboBox.DataBindings.Add(propertyName, obj, dataMember); // obj is the entity
comboBox.DataSource = dataSource; // This is the TypedList
// Set binding modes to propagate changes both ways ASAP
comboBox.DataBindings[0].DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;
comboBox.DataBindings[0].ControlUpdateMode = ControlUpdateMode.OnPropertyChanged;
C# 2.0, VS2005
Self-servicing
LLBLGen PRO designer: 1.0.2005.1.Final, July 6th 2006,
SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll version: 1.0.20051.60719
Thanks in advance for any help,
Alan