MESCIUS.ActiveReports.Design.Win Assembly / GrapeCity.ActiveReports.Design Namespace / Designer Class / EditModeExit Event
Example

EditModeExit Event
This event occurs when an end user leaves edit mode in a TextBox, Label, CheckBox or RichTextBox control in the End User Designer.
Syntax
'Declaration
 
Public Event EditModeExit As EditModeExitEventHandler
 
Event Data

The event handler receives an argument of type EditModeExitEventArgs containing data related to this event. The following EditModeExitEventArgs properties provide information specific to this event.

PropertyDescription
Gets the type of control that is exiting edit mode.  
Gets the exit type.  
Remarks
This event is triggered when the designer transitions out of edit mode, which could be due to the user completing their modifications or cancelling the edit operation. It provides an opportunity to execute custom logic after editing has concluded, such as validation, cleanup, or updating other parts of the UI in response to the changes made.

Listeners can use this event to perform actions that need to occur once editing is no longer active, ensuring that any necessary adjustments or checks are made following the edit session.

Example
private void arDesigner_EditModeExit(object sender, EditModeExitEventArgs e)
        {
            string a=((GrapeCity.ActiveReports.SectionReportModel.ARControl)e.Control).Name;
            if (e.Type == ExitType.Save && a == "txtDocumentOwner")
            {
                // save the new value of textbox control in the temporary field
                _global_do = (e.Control as TextBox).Text;
            }
        }
Private Sub arDesigner_EditModeExit(ByVal sender As System.Object, ByVal e As GrapeCity.ActiveReports.Design.EditModeExitEventArgs) Handles arDesigner.EditModeExit
        If (e.Type = ExitType.Save) And (((GrapeCity.ActiveReports.SectionReportModel.ARControl)e.Control).Name = "txtDocumentOwner") Then
            ' save the new value of textbox control in the temporary field
            _global_do = CType(e.Control, TextBox).Text
        End If
    End Sub
See Also