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. Image for the cookie policy date

Suppressing prompt to save in EditControl

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.

10 Replies

AD Administrator Syncfusion Team July 18, 2005 12:14 PM UTC

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.


MJ Mike J. Keating September 26, 2005 10:14 PM UTC

<> 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.


AD Administrator Syncfusion Team September 27, 2005 02:45 AM UTC

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.


MJ Mike J. Keating September 27, 2005 05:29 PM UTC

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.


MJ Mike J. Keating September 27, 2005 06:45 PM UTC

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.


AD Administrator Syncfusion Team September 27, 2005 06:46 PM UTC

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.


AD Administrator Syncfusion Team September 27, 2005 07:40 PM UTC

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.


MJ Mike J. Keating September 28, 2005 12:12 AM UTC

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.


AD Administrator Syncfusion Team September 28, 2005 02:48 AM UTC

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.


AD Administrator Syncfusion Team October 5, 2005 08:36 PM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon