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

OnClientDragEnd, MasterPage issue

2 Answers 46 Views
Window
This is a migrated thread and some comments may be shown as answers.
neebs
Top achievements
Rank 2
neebs asked on 09 Aug 2011, 08:19 AM
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 Answers, 1 is accepted

Sort by
0
neebs
Top achievements
Rank 2
answered on 09 Aug 2011, 08:29 AM
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
0
neebs
Top achievements
Rank 2
answered on 10 Aug 2011, 07:07 AM
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
Tags
Window
Asked by
neebs
Top achievements
Rank 2
Answers by
neebs
Top achievements
Rank 2
Share this question
or