We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Suppressing prompt to save in EditControl

Thread ID:

Created:

Updated:

Platform:

Replies:

31561 Jul 9,2005 02:27 PM Oct 5,2005 04:36 PM Windows Forms 10
loading
Tags: EditControl
Administrator [Syncfusion]
Asked On July 9, 2005 02:27 PM

How do I suppress the prompt to save the file when using the EditControl? There was a posting from 2 years ago to set the Modified property to false, but there is only a IsModified property, and it is read-only.

Administrator [Syncfusion]
Replied On July 18, 2005 08:14 AM

Hi Pete, In the new EditControl, "Save" prompt dialog appears only if you handle the host form''s Closing event as shown below : private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (this.editControl1.SaveModified() == true) e.Cancel = false; else e.Cancel = true; } If the above code is not used, the EditControl will simply be disposed when the host form is closed. Let me know if you need additional information. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Mike J. Keating
Replied On September 26, 2005 06:14 PM

<> In version 3.3, this doesn''t appear to be the case. The ''Save Changes'' dialog appears whenever the controls is close and text has been modified. In your samples, no handler has been setup for the host form''s Closing event and the dialog still appears on closing if you modify any text. So, the ''Save Changes'' dialog appears to be on by default (this is my experience). How do I turn this off? Thanks. Thanks.

Administrator [Syncfusion]
Replied On September 26, 2005 10:45 PM

Hi Michael, Yes, this feature was incorporated into the SaveModified method in the EditControl in v3.3.0.0. Unfortunately there is no way turn this off in the current version. However, we intend to change the behavior of the Save dialog which appears on closing a modified file in the EditControl as described in the feature request below : Feature Request #456 - Support for a bool property like SaveOnClose Please refer to this feature request and let me know if this meets your requirements. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Mike J. Keating
Replied On September 27, 2005 01:29 PM

Yes, any way to disable this ''Save Changes'' dialog will meet my need to disable it. Unfoturnately, in the context that we are using this edit control, it will not be usable with the ''Save Changes'' dialog popping up automatically. It there some way I can get an expedited fix? Thanks.

Mike J. Keating
Replied On September 27, 2005 02:45 PM

Just so you know, we are not even working with files. The EditControl is part of a panel and its contents are saved and retreived to and from SQL tables. Obviously, we handle this programmatically. So, it is very awkward for this dialog to pop up completely out of context. It looks like a great editor in other respects - and I''m sure this is just a small change. Thanks for your attention to this matter.

Administrator [Syncfusion]
Replied On September 27, 2005 02:46 PM

Hi Michael, Thanks for the update. We will try our very best to take care of this issue at the earliest and send you a private patch containing the fixes. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On September 27, 2005 03:40 PM

Hi Michael, Thanks for the update. A quick workaround here would be to handle the Closing event associated with the host form and invoke the EditControl''s ResetUndoInfo method as shown below : private void Form_Closing (object sender, CancelEventArgs e) { // Implement custom Save logic and invoke the following method this.editControl1.ResetUndoInfo(); } Please refer to the test sample that illustrates this and let me know if this takes care of your problem. Regards, Guru Patwal Syncfusion, Inc.

Mike J. Keating
Replied On September 27, 2005 08:12 PM

Thanks. This does the trick. I''m actually calling ResetUndoInfo() from my panel''s Dispose method. I hope this is okay - it seems to work just fine. Thanks again.

Administrator [Syncfusion]
Replied On September 27, 2005 10:48 PM

Hi Michael, Thanks for the update. I will inform you when the above mentioned feature request is implemented. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On October 5, 2005 04:36 PM

Hi Michael, Feature 456 has been implemented internally and will be available in the next release of Essential Edit (post v3.3.0.0 releases). Please refer to the copy of the latest Essential Edit users guide that shows how the SaveOnClose property and Closing event work (refer to the "File and Stream Handling" sub-section under section "Features" for information on these new features). We appreciate your patience, and thanks for your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;