I'm not sure if this is a bug but at least it seems for me to be one.
The problem occurs in a big application but I could reduce it to a tiny sample where this occurs as well. Pls don't ask about the sense of this application since it is only mirroring the behavior of the real application.
The application consists of a main form that will be started upon application startup. In this form there is an UltraComboEditor showing persons that are taken out of a list of Person objects using databinding with a binding source. There is a second form that has an UltraTree in it which shows the person's data with an UltraTree using the OutlookExpress style so it will look like the properties view in Visual Studio. There are three properties shown for the person: first name, last name and the gender. The gender is shown using an UltraComboEditor where the value could be selected out of a list (female, male). The properties dialog hooks on the SelectionChanged event of the UltraComboEditor in the main dialog so whenever another person is selected there the properties will be shown in the UltraTree. This works all perfectly fine with one exception. As soon as I select another gender using the combo in the UltraTree and select another person in the main dialog, the gender won't update anymore. The cells for first and last name still work fine! It does update as soon as I move away the focus from the gender combo e.g. to another cell. I tried to move away the focus from that cell by programatically select the node for first name but that didn't help. I placed a button onto the properties form and in the event handler for the gender selection changed event I set the focus onto that button and this helps. It seems that there is a problem when setting the value of a cell with underlying UltraComboEditor when this cell (or the entire UltraTree) has the focus.
Although the example isn't too big I don't want to put the source code in this posting but I've attached the entire solution as a ZIP-file to this post (hope that works).
If you remove the comment in method 'OnGenderSelected' so that method Focus on the OK-Button is called this is the workaround.
Kind regards, Wolfgang
Forgot to mention that I'm using NetAdvantage v10.3, Visual Studio 2010 on Windows 7 Enterprise 64bit.
When you close the PropertiesForm, it gets disposed. The second time you select a value from the ComboBox on the main form, the 'tvProperties' UltraTree instance has been disposed of, since its parent form was disposed. Whatever odd behavior you observe from that point on is almost certainly attributable to this.
Hi Brian,
thanks for the reply but the Properties Form is not closed, thus has not been disposed. Both forms are open all the time but as soon as I select another gender with the UltraComboEditor in the UltraTree of the properties form and afterward select another person in the main form the gender combo is not updated appropriately. As soon as another control gets the focus, either by user input or programatically this problem disappears again.
Regards Wolfgang
Sorry, I didn't notice the steps to reproduce, and I made a bad assumption based on the presence of an 'Ok' button. As Mike said, the problem is that the cell is not being brought out of edit mode, thus it is not updated. To this end, you probably should exit edit mode on the cell when 'Ok' is clicked (or whatever action constitutes committing the changes on the form), because if you set the new value when a new person is selected (from the ComboBox on the main form), the change made to the old one would otherwise be lost.