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
1865
XamDateTimeEditor: Cancel
posted

In DropDownClosed i set EndEditMode to true and in EditModeEnded event, I get the new date and call another function.

I want to show a MessageBox and proceed with the above only if the user selected Yes. Where would be the best place to do this? The date should remain unchanged and the above code in EditModeEnded should not execute.

Thanks.

Parents
No Data
Reply
  • 22015
    Verified Answer
    posted

    Hello Jay6447,

     

    Thank you for your post!

     

    I have been looking into your issue and have created a small sample application for you. In the sample application I have a simple xamDataGrid and one of the columns has XamDateTimeEditor as editor.

     

    If you want to revert the changes when the user chesses the Cancel button of a MessageBox you can get the result of the MessageBox(MessageBoxResult). Depending on this result you can set the AcceptChanges property in the EditModeEnding event of the XamDataGrid.

    I have implemented the above mentioned functionality in the mentioned sample application.

     

    Please find it attached and feel free to let me know if you have any further questions on this matter.

    DataGrid_DateTimeEditing.zip
Children
No Data