I have a RadWindow (R2) that opens up from a Link Button on another RadWindow (R1). Through javascript I set the parent window of R2 to the parent of R1 to enable R2 to expand past the bounds of R1. I want R2 to open up maximized in the parent of R1 when the user clicks the link button. I have achieved this to some extent. In R2's page load section of the code behind the page, I set a label equal to a javascript function on R2's html page to maximize the RadWindow:
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if ((Label1.Text == "<script>CloseWin();</script>") |
| || (Label1.Text == "")) |
| { |
| Label1.Text = "<script>MaximizeWin();</script>"; |
| } |
| else |
| { |
| Label1.Text = ""; |
| } |
| } |
| function MaximizeWin() { |
| var oWindow = GetRadWindow(); |
| oWindow.maximize(); |
| } |
| function CloseWin() { |
| var oWindow = GetRadWindow(); |
| oWindow.Close(); |
| } |
This works to maximize R2; however, after I close R2 (setting the label's text equal to a javascript function CloseWin()) and then click the link button again, R2 opens maximized for like half a second and then moves. Instead of the top left corner of R2 being in the top left of the parent page, it is now in the center of the parent page. I'm not sure why this happens when opening R2 as there is another link button on R1 that opens another Radwindow (R3) the same way, and R3 always opens up maximized and never moves after opening. I'm really confused because R3 works fine because I created R2 by copying and pasting everything I used to make R3, with the exception of the NavigateURL's of the RadWindows.
If any more info is needed, please let me know.
Thanks
