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
2805
How to cancel the value change in xamDateTimeEditor
posted

I tried to cancel the date/time change inside of the ValueChanged event due to some logic. Since I need to set the value back to the old value, there is an endless loop. I know the value has been changed WHEN ValueChanged event is triggered. How can we cancel the value change?

Thanks for help.

Parents
No Data
Reply
  • 5600
    Offline posted

    Hello,

    Actually you cannot cancel the ValueChanged event. What you can do is to use the event arguments. There are two properties there:

    e.OldValue  and  e.NewValue.

    You can set the xamDateTimeEditor.Value to the e.OldValue, in order to revert back to the editor's previous value.

    Hope this helps you.

    Regards,

    Anastas

Children