Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
Getting an error when assigning a nullable db object to the WebDatePicker
posted

Hello,

 

Need some help: when i assigne a Nullable<DateTime> filed to the WebDatePicker:

"Cannot convert source type 'System.Nullable<DateTime>' to target type 'System.DateTime'..

wdpDiscDate.Date = vipLifeCycleEo.DiscDate;

I have set the WebMonthCalendar and WebDatePicker to allow nulls...

 

Thanks

Sal

Parents
  • 49378
    posted

    Hi salsack71,

    The Nullable property of the WebDatePicker refers to the ability of setting the Value property of the control to null (setting the value of the date picker also sets its Date). Therefore in your case I suggest trying:


    WebDatePicker1.Value = db.DiscDate;

    Please let me know if this resolves your issue.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Reply Children
No Data