... or should I say, "I'm not doing it properly..."
I have a BindingList<Person> (people) where Person has a single property (for demonstration only) Name of type string.
I populate the BindingList with a collection of Person objects and set a BindingSource.DataSource (personBindingSource) to my people BindingList.
In the designer, an UltraComboEditor's DataSource property is set to personBindingSource. When I run the application, it successfully populates the UltraComboEditor.
I also have an UltraTextEditor that is also bound to the personBindingSource. The Text property is bound to the Name property. Upon load, the UltraTextEditor displays the first Name in the people BindingList. When I change the selection in the UltraComboEditor, the UltraTextEditor does not update.
On a related note, when the user types into the UltraComboEditor, I 'd like to use it's Validating event (or some other more appropriate event) to determine whether the SelectedItem is null. If so, I add a new Person object to the people BindingList. This works for the UltraComboEditor, but again the UltraTextEditor doesn't show the appropriate selected item.
FYI... I am setting the UltraComboEditor's ValueMember to Infragistics.Win.BindableValueList.USE_LISTOBJECT_AS_VALUEMEMBER.
Please help
Got it! In the validating event of the UltraComboEditor, I check to see if the SelectedItem is null. If it is, I create a new Person object and add it to the BindlingList<Person>.
I had the DataBinding on the Value property to the bindingsource Person.Name property. That did the trick.
Thanks for your help , Matt.
Thanks a ton. That helps me with the Binding to the UltraTextEditor.
The companion issue that I mentioned above is to add to the BindingList people when the UltraComboEditor is Validating and the SelectedItem is null. Upon adding the new Person to the BindingList, the SelectedItem becomes this newly added Person (I checked in Validated event), but the UltraTextBox is not updated.
Try setting the SyncWithCurrencyManager property of the UltraComboEditor to True.
-Matt