Hi. I hoped that the UltraDateTimeEditor would support databinding to DateTime? types, but it appears to not be as simple as setting the Nullable property. My object has the following property:
public DateTime? ProcessDate{get;set;}
and I am setting up a binding as folows:
myDateTimeEditor.DataBindings.Add(new Binding("Value", myObject, "ProcessDate"));
However, databinding doesn't seem to work at all with nullable types. Is this correct?
Yes, these posts were made back in 2008. These Nullable issues were fixed a long time ago. If you are using an old version of the controls, you should try getting the latest service release. If that doesn't work, you will need to upgrade to the latest version.
How to get the latest service release - Infragistics Community
I am also having the same issue. Has this issue been resolved?
Hi,
I am also facing similar scenario -
The databinding for "Value" property doesn't seem to work with nullable types. I have also tried Matt's solution of using the overload with 4th parameter to specify that formatting should be enabled. - this.ultraDateTimeEditor1.DataBindings.Add("Value", this, "ProcessDate", true);
I have created a custom control, using Infragistics.Win.UltraWinEditors.UltraDateTimeEditor control. When I try to set a nullable DateTime? value in one of its property, a wrapper over the Value property of the UltraDateTimeEditor control, the setter on my property is never being called instead it fetches old value of the control after calling the Getter.
I'm using - NetAdvantage 2006 Volume 1 CLR 2.0.
ThanksVivek Bahl
Use the 4th parameter overload to specify that formatting should be enabled, such as:
this.ultraDateTimeEditor1.DataBindings.Add("Value", this, "ProcessDate", true);
-Matt
With the DateTime type databinding works as expected. With DateTime? the setter on my property was never being called after the value of the editor was changed. The databinding was wired up in exactly the same way for both.
EDIT: I'm using NetAdvantage for .NET 2007 Vol 1 CLR 2.0