When typing in a date in the UltraDateTimeEditor the value changed event is firing as soon as you type in the first digit of the year. This causes the date to be set in the control. I tested against Net Advantage 2009.1 and also the Service Release 2039.
To test create a winform drag a date time editor onto the form subscribe to the value changed event and put a break point on the event. Run app and type in a date. As soon as you type the first digit for the year part the event fires and sets the date.
This is only a problem if you subscribe to the value changed event.
This is the intended behavior. Whenever you type into the control, it calls Date.Parse and tries to turn the text into a date. Date.Parse will return a date if you enter a single digit, so the control's value changes.
This was not the behavior of this control in the 2008 .net 2.0 version.
We recently upgraded to 2009 controls and this has caused breaking changes at RunTime in our application.
I can change from using the ValueChangedEvent to AfterExitEditMode and all is fine.
Are you stating that the ValueChangedEvent should fire on the first digit I type in?
Currently it fires on the first digit of the year portion. Does that happen because the when I enter in the first digit of year the date.parse is successful?
Subscribing to the ValueChangedEvent will aways set the year to 2000 to 2009 if typing in a date.
Hm. I just tested this out and it looks like I was wrong. DateTime.Parse("1") does not return a valid date, it raises an exception.
So if this behavior changed from a previous version it must have been as part of a bug fix and it may not have been intentional. I'll forward this thread over to Infragistics Developer Support so they can check it out.
Is there anything new in this problem?
Hi Dimitris,
It looks like we started a support case on this, but the original poster was never able to tell us how to reproduce the issue. So since we cannot duplicate the problem, we haven't been able to look into it.
Are you able to duplicate this in a small sample project? If so, please post it here and we will check it out.
Actually I don't want to report a problem here. I just want to know what is the indended behaviour, since the digitaldan3 says that behaviour change in the latest version. I'm using 9.1.20091.2012 and I see that ValueChanged event of UltraDateTimeEditor is fired when the user starts typing. digitaldan3 says that in previous version the event was fired when the control was losing focus (AfterExitEditMode).
I just want to know what is the expected behaviour regarding ValueChanged event so that I know how to use it.
Hi,
I am getting same problem what you had discussed earlier, I have assigned the value to the BO property through databindings, so I cannot add AfterExitEditMode for this control alone.
I am using custom control which is inherit from UltraDateTimeEditor(ver 9.1) , Is there anyway to solve this problem only change in the custom control?
Use the AfterExitEditMode event.
Then you can grab the date
mydate = dteTransferDate.DateTime.Date
I am quite new to Infragistics. I am using 8.2. I am also getting the same issue as stated above. When I am trying to update a date say from 12/11/2009 to 12/10/2009, as soon as I delete a one I am getting the date value as 12/01/2009. I have to again change the value to 12/10/2009. The problem can be clearly viewed when a breakpoing is used.
Can you tell me a work around for that??
Thanks.
You should probably contact Infragistics Developer Support for the details, but my understanding is that Developer Support was unable to determine any change in behavior from one version to the next. So if that's the case, the current behavior is, and always has been, the expected behavior.