OnClientDragEnd, MasterPage issue

3 posts, 0 answers
  1. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 09 Aug 2011 Link to this post

    Hello, I have a master page that contains a RadWindowManager, with a number of RadWindows Defined. I have working code from an earlier project in which no master page was used, where I can save the window's position after it's moved, by using the OnClientDragEnd event. This does not seem to get fired in the master page version. Here is the RadWindowManager from the master page:

    <telerik:RadWindowManager ID="RadWindowManagerMaster" runat="server" OnClientDragEnd="WindowMoved" PreserveClientState="true"
        Behaviors="Close, Move" Behavior="Close, Move">
        <Windows>
            <telerik:RadWindow ID="BinAssignmentDialog" runat="server" Title="Bin Assignment" Height="384px"
                Width="530px" Left="400px" ReloadOnShow="true" OnClientDragEnd="WindowMoved"
                ShowContentDuringLoad="false" Modal="true" VisibleStatusbar="false"
                Top="80px" />
        </Windows>
    </telerik:RadWindowManager>

    The window is apparently using this definition as the window size agrees with the above. The code that opens the window follows:

    function ShowBinAssignmentDialog(bintolotid) {
     
        var oWndMgr = $find("<%= RadWindowManagerMaster.ClientID %>");
        var oWnd = oWndMgr.Open("BinAssignmentDetail.aspx?btl=" + bintolotid, "BinAssignmentDialog");
        var x = readCookie('BinAssignmentDialogLeft');
        var y = readCookie('BinAssignmentDialogTop');
        if (x) {
            oWnd.moveTo(x, y);
        }
        else {
            oWnd.moveTo(80, 80); // move to top left 
        }
        return false;
    }

    The client method "WindowMoved" looks like the following:

    function WindowMoved(sender, args) {
        debugger;
        window.setTimeout(function () {
            SaveSizeAndPosition(sender, args);
        }, 10);
    }

    Yet the debugger is never hit. This arrangement worked before I moved the RadWindowManager to the master page. Any suggestions would be appreciated.

    Steve
  2. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 09 Aug 2011 Link to this post

    I suspect what I'm trying to do is unnecessary after looking at the setting "PreserveClientState". However I tried this and it does not seem to have an effect either. So I'm still stuck trying to save the window positions for popups.

    Steve
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 10 Aug 2011 Link to this post

    I have found the solution to this problem. I had another web control (ascx) file that had it's own version of WindowMoved(). It was getting called instead of the one I wanted to get called.

    Steve
Back to Top