Bug Report T215972
Visible to All Users

Clicking the Cancel button doesn't close the Event dialog after handling an exception that occurred on posting an event to a database

created 10 years ago

Hi Devexpress Support

I today got aware of a glitch in the Event Editor. As I edited an event my colleague was also editing at the same time , I was not able to save the event because of his modifications (showing the db info dialog 'some data was modified'; absolutely correct).

But hitting the cancel button on my Event Dialog brings up the 'do you want to save…' confirmation, therefore I went for the 'No' button. But even the 'No' button raises the 'some data was modified' dialog, which is wrong, as no data should be persisted to the db. So I had no way to close the Event Dialog.

[The only way to close the dialog is to use the dialogs X button .]

Please change the Cancel/No button behavior to correctly close the dialog. (In my opinion, it's even not necessary to ask 'Do you want to save changes?' on hitting the 'Cancel' button on the Event Editor Dialog, but at least the 'No' answer should close the dialog.)

Many thanks for an update.

Kind regards
Jonas

Show previous comments (2)

    Sorry, it will take me half an hour, deleted the prepard video transcript. :-)

      The application is started twice ('left' and 'right') with a visible event 'test121'.
      Both applications open the event.
      The left application changes the event caption to 'test1213'.
      The right application changes the event caption to 'test12'.
      The right application saves the event with OK. Event gets saved, all ok.
      The left application saves the event with OK. Database failure as expected. The error gets confirmed with OK.
      The left application clicks to 'Cancel', the 'Do you want to save changes?' Dialog appears.
      The left application clicks to 'No' (='Nein' in german). The database delivers the database failure again. (THIS IS WHAT I DO NOT EXPECT, because I clicked to 'Cancel'. I know this happens because of an already modified record.)
      The left application clicks to 'Cancel', but as the recordset is in modified state, it always tries to persist the changes, therefore bringing up the database failure. This is repeated 3 times.
      Finally the dialog is closed by the forms X button and the dialog get's closed. (This is what I would expect on clicking the 'Cancel' button.)

      DevExpress Support Team 10 years ago

        Thank you VERY much for your detailed problem description. The current behavior looks incorrect, so I have forwarded this ticket to our developers for research. As a temporary workaround, you can use the following code:

        Delphi
        procedure TcxSchedulerEventEditorFormHelper.Cancel(var AModalResult: TModalResult); begin if CanClose then begin FModified := False; Close(AModalResult); end else AModalResult := mrNone; end;

        Answers approved by DevExpress Support

        created 10 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          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.