This is a migrated thread and some comments may be shown as answers.

Detect when RadWindow is closed by the user.

1 Answer 138 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Erika
Top achievements
Rank 1
Erika asked on 17 Dec 2010, 04:03 AM
I have a .NET asp page that opens a RadWindow. Is there a way to know when the RadWindow is closed by the user? I have a function that I need to execute when the RadWindow is closed. I have tried setting DestroyOnClose to true and calling my function through the OnClientClose event, but setting DestroyOnClose to true causes a popup error on my page. The error says "Exception while executing client event OnClientClose Error:'this._iframe' is null or not an object." I have no idea what is causing that error. Is there a way to detect when the user closes the RadWindow without using DestroyOnClose and OnClientClose? Do you know what is causing my error when I do use those things?

I appreciate any help. Thanks,
Erika

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Dec 2010, 02:34 PM
Hello Erika,

Usually such error (this._iframe .... ) is raised when you try to reference RadWindow / RadWindowManager before the control is fully rendered on the page. Most often this happens in scenarios where a code is executed in window.onload (i.e. when the page is loaded). All ASP.NET AJAX controls however (including ours), are rendered on a later stage - in Sys.Application.Init.. In such scenarios, you need to make sure that the code is executed only after all controls are rendered - for example, you can use pageLoad() (this client-side function is called automatically when all Ajax controls are rendered on the page) or use some timeout.
In any way, to be able to help, I need to get a better view over your exact setup and logic. Please open a support ticket and send me a sample project where the problem can be reproduced. I will check it and do my best to help you right away.


Kind regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Erika
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or