Hi
I've come across a bit of odd behaviour in the ultracombo: When it is bound to field of a nullable type (e.g. a nullable int), and AllowNulls is set to true then when you blank the combo's text via the UI the property the control is bound to is correctly set to null. However, if the combo is bound to a string field then when you clear the text from the combo the underlying property is not updated at all. The combo allows you to move the focus away and is blanked, but the field underneath is still retaining the original value.
Is there a way to change this behaviour?
Hi Tom,
I tried this out and it's working just fine for me.
I'm attaching my sample here. The grid is there just so you can navigate the current row and see the data. But clear he comb0 and click on another grid row and you can see that the grid cell is blanked out - so the data source is being updated correctly.
Hi Mike
Thanks for testing it out and creating the sample - I see what you mean, but actually if you set the value of the cleared cell again via the combo (e.g. to Banana so both the combo and cell say Banana) and then clear the combo again the cell text will then remain as Banana. That's the same symptoms as I had I think, but I haven't used the UltraDataSource before so I'm not completely sure what is going on.
I've attached an example that hopefully illustrates our issue. It consists of a simple class (Class1) with a string property (Class1.SomeText) and a nullable int property (Class1.NullableInt). There are then combos with either a list of strings or a list of ints as their data sources that are bound to those properties. All the binding is using standard .net bindingsources. The combos are set to LimitToList = true and AllowNulls = true.
Steps to reproduce our issue:
(What has also surprised me is that I am now getting the same issues as above when bound to a nullable int which I didn't think we did previously)
Mike Saltzman"] So this seems like a problem on your machine. Maybe you need to get the latest service release for NetAdvantage.
So this seems like a problem on your machine. Maybe you need to get the latest service release for NetAdvantage.
That was the answer. I upgraded to 13.1 and all was well. Well, it was after I then upgraded everything to .net 4.
As ever, thanks for responding so quickly and helping us get going again.
I tried again using my sample and I am not getting the results you describe. Here's exactly what I did:
So then I tried it out with your sample and I am not getting the results you describe there, either. When I get to step 5, both Combos and the TextBox are all blank and when I press the button, I get "Nothing".