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?
What problems are you having exactly? I just tried this and it is working correctly on my machine, though I passed in "this" for the second parameter of the Binding constructor, since my code and the property are on the same form. What version are you using? I am aware of some issues that were fixed a while ago, so upgrading to the latest hotfix might address your issue.
-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