reposition radwindow and open multiple windows

2 posts, 0 answers
  1. yao wang
    yao wang avatar
    25 posts
    Member since:
    May 2010

    Posted 07 May 2010 Link to this post

    Hi,

    I am stuck on a project for a while. please give me some suggestion.

    The requirement is that there is a radlistbox which contains buttons in a radwindow AAA. Once I click any button inside the radlistbox, a new radwindow BXX will show up in a designed position according to which button has been clicked.If the button has not been clicked before,a new radwindow BXX will be opened. That means if I clicked two different buttons, two new radwindow BXX will be opened in the window. If the button has been clicked, there is no need to open new radwindow.

    Also, the radwinow AAA which contains the radlistbox could be repositioned in the window. If it is repositioned, when I click any button inside the radlistbox, a position of new radwindow BXX according to the reposition.

    My question 1 is. how to open multiple new radwindows BXX in desgined position? I use the code below and only get a radwindow BXX instead of multiple radwindow BXX.
     

     

     

    function ShowWindow(assetId){

     

     

     

    var pos = GetTopLeftWidthPosition(assetId);

     

     

     

    var oMan = GetWindowManager();

     

     

     

    var oWnd = oMan.getWindowById("WIDGETcf0376226a6944999bc3269b48fbc4ac");

     

    oWnd.setUrl(

     

    "<%=GetWidgetURL(Settings.PAGE_ASSETMARKETVIEW)%>" + "?aid=" + assetId, "WID_AMV_ONE"+assetId.toString());

     

    oWnd.moveTo(pos.left,pos.top);

    oWnd.show();

    oWnd.setActive();

     

    }

    My question 2 is. When I reposition the radwindow AAA using the code below, it only work after second reposition.

     

     

     

    var oMan= GetWindowManager();

     

     

     

    var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");

     

    oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");

     

     

     

    oWnd.add_dragEnd(OnClientDragEnd);

    oWnd.show();

     

     

     

    var oMan= GetWindowManager();

     

     

     

    var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");

     

     

     

     

    oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");

     

     

     



     

     

     

    function OnClientDragEnd(sender, eventArgs)

     

    {

    window.setTimeout(

     

    function () {

     

    bounds = sender.getWindowBounds();

    }, 20);

    }

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 May 2010 Link to this post

    Hello yao wang,

    With your code, you get a reference to a particular RadWindow, set its Url and show it. When this code is called for a second time, the same RadWindow will be used - if you want to get a new RadWindow you should create it first (for example with radopen()).

    As for your second question, I have already answered it in this forum post.


    Best wishes,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top