Calling function on non modal window from parent

5 posts, 0 answers
  1. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 08 Jul 2009 Link to this post

    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
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Jul 2009 Link to this post

    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.
  3. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 09 Jul 2009 Link to this post

    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
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 09 Jul 2009 Link to this post

    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.
  5. Eric
    Eric avatar
    82 posts
    Member since:
    Feb 2009

    Posted 09 Jul 2009 Link to this post

    Georgi,

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

    Thanks


    Eric
Back to Top