Page 1 of 1
Catch closing designer without saving changes
Posted: Tue May 03, 2011 6:46 pm
by jay@bplogix.com
Is there any way to catch (with a confirmation prompt for example) if the user closes the designer before saving their changes? Right now if they close the window and forgot to save, all of their changes are lost.
thx
Catch closing designer without saving changes
Posted: Wed May 04, 2011 6:42 am
by Alex K.
Hello,
As a way, you can describe to Exit event of WebDesigner:
Code: Select all
protected void StiWebDesigner1_PreInit(object sender, Stimulsoft.Report.Web.StiWebDesigner.StiPreInitEventArgs e)
{
StiWebDesigner1.Exit += new Stimulsoft.Report.Web.StiWebDesigner.StiExitEventHandler(StiWebDesigner1_Exit);
}
...
void StiWebDesigner1_Exit(object sender, Stimulsoft.Report.Web.StiWebDesigner.StiExitEventArgs e)
{
if (e.Report.IsModified)
{
// your code
}
}
Thank you.
Catch closing designer without saving changes
Posted: Wed May 04, 2011 7:10 pm
by jay@bplogix.com
This event is not fired if the user simply closes the web browser. Is there another event that can catch the web browser being closed?
thx
Catch closing designer without saving changes
Posted: Thu May 05, 2011 7:58 am
by Alex K.
Hello,
Sorry, but there is no way to trace when a browser is closed.
Thank you.