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
100
XamDateTime editor default value
posted

Hi folks,

 I am using XamDateTime editor in my form. DateTime editor have its value bound to business object property of type DateTime. The property on business object has its value validated using enterprise library. Now, in case user leaves XamDateTime editor empty, I want its value to be null, so entlib can validate and show validation message. If it is possible, how can I achieve such behavior.

 Thanks Peter

 

Parents
No Data
Reply
  • 2070
    posted

    Hi Peter,

     

    DateTimeEditor converts empty values to DBNull. If you are using bindings to bind Value property to your business object then you should be able to assign a converter on the binding that converts dbnull to null values. 

    Hope this helps,

    Sandip

Children
No Data