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

Calling function on non modal window from parent

4 Answers 102 Views
Window
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 08 Jul 2009, 12:54 PM
Dear all,

I think I have understood the way to pass arguments back and forth between windows using an event.args object.

I do initialise my popup window this way (onload="Initialize()", etc) and retrieve my data when the page displays the first time and this is fine.

I want to keep my popup window on close so the second time I open it, there is nomore initialisation.

How can I force a "new" initialisation when I re-open my popup window?

I suppose I could get a reference to the popup RadWindow and call a javascript method that way but I am worried about synchronisation the first time.
How do I know that my popup window is ready to fire the extra javascript function?
Or, is it possible to know whether the popup window already exists before calling myRadWindow.Show()?

I hope I made sense...


Thanks

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 08 Jul 2009, 02:03 PM
Hello Eric,

If I understand your scenario correctly, setting ReloadOnShow=true and ShowContentDuringLoad=false should solve the problem.

As for calling a function in a RadWindow from parent page, I believe that the following help article will be of help.
Calling Functions in Windows


Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eric
Top achievements
Rank 1
answered on 09 Jul 2009, 09:27 AM
Hi Georgi,

The ReloadOnShow feature is very interesting but it does not entirely answer my problem because I need to decide whether or not to refresh the page depending on some arguments.

The "Calling functions on Windows" would actually solve my problem but I stumbled into the issue of get_windows() not returning anything (I replied to Rad Window Problem for that).


Thanks


Eric
0
Georgi Tunev
Telerik team
answered on 09 Jul 2009, 12:33 PM
Hi Eric,

I just answered you in the other forum thread. For convenience I paste my reply below:


If it is the same setup as Arindam's and you are ajaxifying the RadWindowManager for some reason, yes this could be the reason. The good news is that this exact problem - RadWindowManager not finding its windows in the Windows collection after being updated with Ajax - is fixed in Q2 2009. For convenience I attached a small sample that shows the problem that was fixed. If you run the sample with an older version of the control, you will get empty collection after reloading the manager with Ajax. If you are using Q2 2009 however, everything will work as expected.

Please make sure that you are using the latest version of the control. If you still experience problems after that, it will be best to open a support ticket and to send me a small sample project where the problem is isolated. I will check it and get back to you right away.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eric
Top achievements
Rank 1
answered on 09 Jul 2009, 01:55 PM
Georgi,

I just chickened out and removed all traces of Ajax from that page!

Thanks


Eric
Tags
Window
Asked by
Eric
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Eric
Top achievements
Rank 1
Share this question
or