IsDirty Property (SectionReport)
Sets or returns the current state of the report layout. This property is set to True when any changes are made to the report layout since it was last saved.
public bool IsDirty {get; set;}
'Declaration
Public Property IsDirty As Boolean
Property Value
A
System.Boolean value.
true
if any changes have been made to the report layout since it was last saved; otherwise,
false
.
NOTE: The following is incomplete code. You would need to add your own code to handle the user's answer via the MessageBox.
private void mnuExit_Click(object sender, System.EventArgs e)
{
if (((GrapeCity.ActiveReports.SectionReport)this.reportdesigner.Report).IsDirty == true)
{
MessageBox.Show("Do you want to save your report?");
}
else
{
this.Close();
}
}
Private Sub mnuExit_Click(sender As Object, e As System.EventArgs)
If DirectCast(Me.reportdesigner.Report, GrapeCity.ActiveReports.SectionReport).IsDirty = True Then
MessageBox.Show("Do you want to save your report?")
Else
Me.Close()
End If
End Sub