M
Marka83
I'm creating custom datetimepicker with nullable<datetime> property Value.
When I bind this control
Binding b = new Binding("Value", source, "some nullable property");
DatePicker.DataBindings.Add(b);
and start application it throws this exception
Invalid cast from 'System.DateTime' to 'System.Nullable`1[[System.DateTime,
mscorlib, Version=2.0.0.0, Culture=neutral ...
I've tried to define format() and parse() but it's of no use.
In this example i've used visual studio 2008 and source is result of linq to
sql query
When I bind this control
Binding b = new Binding("Value", source, "some nullable property");
DatePicker.DataBindings.Add(b);
and start application it throws this exception
Invalid cast from 'System.DateTime' to 'System.Nullable`1[[System.DateTime,
mscorlib, Version=2.0.0.0, Culture=neutral ...
I've tried to define format() and parse() but it's of no use.
In this example i've used visual studio 2008 and source is result of linq to
sql query