Hi,
I have a bounded Ultracombo having following items in the list.
ID Code--------------------1 A 2 B3 Ccombo is binded with a table having two columns, ID and Code. DisplayMember is Code and ValueMember is ID. Whenever we type any data that is not in the list then ValueChanged event is firing twp times. Lets say I typed D in combo then
First time UltraCombo.Value comes as null and second time it comes as the data I typed ( "D" ). This is happening in 9.1 version dlls.In 8.1 version dlls it was working fine ( ValueChanged event was firing only once ). We were using 8.1 dlls and out application was designed to check value null for invalid data. After upgading the dlls all these problems get started.. Its crashing our application..
Are you guys going to fix this bug?
Thanks,Dhananjay
Hi Dhananjay,
I just tested this out in a small sample project and it seems to work fine for me. The event only fires once.
I am attaching the sample I used so that you can try it out and see if you get the same results. If you do, then there's some other factor at work in your application that is causing this. Maybe a property setting or the handling of an event.
If not, then it's probably because I'm usinga newer build than you and you should get the latest service release.
Hi Mike,
Why ultraCombo.Value is coming as invalid data? in earlier version dlls if we type invalid data ( If ValueMember does not match ) then Value was coming null. now its coming as typed invalid data... I think, earlier functionality was correct.. combo.Text should come as Typed text and Value should be null because ValueMember did not match.. Do you guys fix this Or this is new feature...?
ThanksDhananjay
I tried this out and I do not get the results you are describing.
I ran this code and selected item 2 from the list. I see a 2 in the Combo and the ValueChanged event fires with a 2.
Then I typed in a "4", and the ValueChanged event fired with a "4".
I am, of course, using the latest service release of the controls.
The control has to return the text you typed.When DropDownStyle is set to DropDown, it's perfectly valid to type something into the combo that is not on the list and you, the developer, have to be able to get the value from the combo.
So if this was returning null in some older version of the controls, then that was a serious bug and must have been fixed.
I have the same problem when user types an invalid value.... valueChanged came with value=nothing and text=4 in earlier versions, with the last version value=4 and text=4
...anyway, with the last version how can i know if the invalid value comes from an invalid text that the user inputs or if it comes from an invalid value set via code?
i mean... if i set in code:
combo.value = "invalid value" -> then valuechanged raises with value="invalid value" and text="invalid value"
if i write to the combo "invalid value" -> valuechanged raises with value="invalid value" and text="invalid value"
how can i know if valuechanged raised because of what the user inputs or it raised because of a change of the value via code?
Why would your code set the value to an invalid value?
There's no way within the event to tell. But presumably if your code is setting the Value, you know it's doing to. So you could set a flag.
Just to add to this thread, we have also been having exactly the same issue after recently upgrading our Controls to 9.1 (from 6.x).
A lot of our code relied on the fact that the "Value" property would be null when the user decided to free type an entry into the combobox when it didnt exist in the list (so we could determine that it would need to be added to the database as a new item).
Because the "Value" property is now returning the "Text" property we are fairly limited and unsure on what approach to take to resolve the problem (and we need to be cautious with it being a global change affecting all areas of our system).
Initially i thought it would be best posting here to see if any further information had been obtained by anyone on this matter. It would be beneficial if we could determine if this was an intentional change and if it was documented in a specific release (i did an initial search but failed to find anything).
After reviewing our system it would be quite a lot of work to rewrite every instance which is affected by this change to the controls behaviour so im hoping there is an alternative.
Any help or thoughts appreciated.
Regards,
N . Corns
Sorry, I guess I was thinking about UltraComboEditor. There are no such events on UltraCombo.If you don't need multiple columns in your list, you might want to consider using UltraComboEditor, instead of UltraCombo. I don't think this problem occurred in both controls.
Can't find any Before/AfterExitEditMode events for UltraCombo. Anyway, thanks a lot for the info.
I don't think there's any way to work around this.
You can try using the Before/AfterExitEditMode events.
There is no event that fires when the user is finished typing, because it's impossible for the control to know when they are "finished". You might be able to make use of the Validating event, which will fire when they try to leave the control.
But personally, I doubt that any of these events will help.
Any work around you may think of? I don't think by any chances our company will take the risk to upgrade it to v10.3.
May I know what is the event UltraCombo control fire when it out of the edit mode? Or may I know what is the event fire when user finished entering the text manually in the text box?
Thank you very much.
If the latest service release for 8.2 is not working, then there's nothing we can do. That version is over 3 years old and is no longer being updated.