Wrong RadWindow is opened

3 posts, 1 answers
  1. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 14 Feb 2013 Link to this post


    In my project, i have added multiple RadWindowManager in one aspx page and the issue is, Sometimes a different RadWindow is opened apart from the expected one. How to rectify this issue?

    Thanks in advance,
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Feb 2013 Link to this post

    Hi Ivy,

    You are experiencing this strange behavior because of the presence of more than one RadWindowManager on the same page. Sometimes a call to radopen() opens a RadWindow with unexpected settings or a different one when a page contains more than one RadWindowManager.

    The RadWindowManager is designed to work as a singleton - i.e. only one instance per page. The radopen() (and radalert(), radconfirm(), radprompt() functions as well), being global functions, are attached to the first instance that is created on the page, which may result in some unexpected behavior if other managers are present as well - the RadWindow with the given ID (the second argument passed to the function) needs to be in the Windows collection of the targeted manager, otherwise a generic one with the settings from the first manager will be opened.

    This particular issue can be resolved by the following appraches.
    Get a reference to the RadWindowManager which you want to use via $find("DesiredRadWindowManagerClientID") and use its own open() method.

    var oWnd = $find("<%=RadWindow1.ClientID%>");

    Another approach is like You can directly open the desired RadWindow via $find("RadWindowClientID") and call its show() method. Also try to move all the RadWindows you use to the single RadWindowManager.

  3. DevCraft R3 2016 release webinar banner
  4. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 15 Feb 2013 Link to this post

    Thank you pricy for your clear explanation. The issue is solved by following the approach you mentioned.
Back to Top