Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
New Item added to BindingList doesn't bind properly
posted

... 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