Ticket Q380252
Visible to All Users
Duplicate

problems during confirmation save

created 13 years ago

Hi,
I want to show some kind of a confirmation dialog whenever the user tries to save "TestObject" with "TestValue" over 5.
I have 2 problems in my attached sample:
1.     If the last saved value is lower than 5,then I rerun the application, then change it to something above 5, I don't get a message. Only in the next time I'll get the message.
2.     After the first time of getting the message, it will be there every time
Thanks

Show previous comments (5)
Dennis Garavsky (DevExpress) 13 years ago

    Hi Golan,
    Thank you for the update. Please let us some time to research your code. We will get back to you once we are done.
    Thanks,
    Dennis

    CP CP
    Constantine P (DevExpress) 13 years ago

      Hello Golan,
      First of all, you handle the Changed event instead of PropertyChanged. It will not work because in your case, this event is raised during the action execution when the confirmation message has been already checked.
      Handle the PropertyChanded event instead, as I recommended before.
      I have tested this approach with the latest version of the framework and can say that it works fine on my side.
      However, there could be problems with previous versions since we have significantly improved the web part with the latest version.
      I recommend you upgrade to the latest version to avoid such problems.
      Thanks,
      Constantine

        Thank you,
        Could you please send me an example that demonstrates the usage of PropertyChanged event in accordance with my case.
        Thanks,
        Golan

        Answers

        created 13 years ago

        Hello Golan,
        Here is a sample:

        Code
        ... protected override void OnActivated() { base.OnActivated(); controller = Frame.GetController<DetailViewController>(); ((INotifyPropertyChanged)View.CurrentObject).PropertyChanged += new PropertyChangedEventHandler(CurrentObject_PropertyChanged); } private void CurrentObject_PropertyChanged(object sender, PropertyChangedEventArgs e) { if(e.PropertyName == "TestEnum") { controller.SaveAndCloseAction.ConfirmationMessage = message; controller.SaveAction.ConfirmationMessage = message; controller.SaveAndNewAction.ConfirmationMessage = message; } } ...

        Thanks,
        Constantine

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.