posted on Tuesday, May 16, 2006 3:53 AM
by
roytore
DataBinding with Nullable types
One of the new thrilling features in .NET 2.0 is the introduction of generics, and as an consequence we also got the Nullable type.
Nullable makes it possible to set value types (Integer, DateTime) to null.
When using Windows Forms Data Binding in combination with Business Objects with members of type Nullable, you soon run into problems when you whant to set the DataMember to null. There is no buildt-in way to do this. At the P&P Summit in Oslo last week I discusses this problem with Rockford Lhotka, we came up with a solution using the ProviderExtension modell in Windows Forms.
A colleague of mine Thomas Bruusgaard wrote this blogpost about how to implement the NullableExtension.
You can aslo read what Rocky wrote about this.