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

Strange RadWindow Issue

4 Answers 175 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 06 Aug 2008, 04:19 AM
Hey all, I am just asking here in the event that anyone else has encountered this issue.

I have a MaterPage that contains a user menu. Most of the links load another .aspx page, but a few of them open RadWindows. I have had this configuration for a while, and it has been working fine during my development.

Suddenly, a day or so ago, the radopen method does not appear to find the window desired. It loads the correct page, but all of the window settings (Skin, Height, Width, etc) are set to a default view (100 x 100?). It is completely baffling me.

To make it MORE confusing, on this master page I have a user control that loads a list of logged-in users. Clicking the username opens the user profile in a RadWindow... THIS one works just fine. The only difference is that the UserControl holds everything to call the profile window and the Master page has the other ones. Below is the master page and javascript calls.

I would note that I have the 2008 Q2 release of the ASP.NET Ajax control suite.

Thanks!

...TRUNCATED...  
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Src="~/Members/Modules/OnlineList.ascx" TagName="OnlineList" TagPrefix="ol" %> 
 
...TRUNCATED - I have given the particular Content Placeholder in question....  
 
<asp:ContentPlaceHolder ID="contentSidebarLeft" runat="server">  
        <div class="sidebarLeft">  
            <div id="myStyffWrap" class="myStuffWrap">  
                <telerik:RadPanelBar runat="server" OnClientItemCollapse="SetCookie" OnClientItemExpand="SetCookie" 
                    ID="RadPanelBar1" Skin="Black" ExpandMode="MultipleExpandedItems">  
                    <CollapseAnimation Type="Linear" Duration="150"></CollapseAnimation> 
                    <Items> 
                        <telerik:RadPanelItem Text="&nbsp;&nbsp;Member Functions" ImageUrl="../Images/panelbars/folderList.gif" 
                            Expanded="true">  
                            <Items> 
                                <telerik:RadPanelItem Text="AQ Mail" NavigateUrl="AQMail.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Visible="false" Text="Admin" NavigateUrl="../Administration/SiteAdmin.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Visible="false" Text="Magistrate" NavigateUrl="Magistrate.aspx">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="Dice Roller" onclick='ShowDiceRoller()'>  
                                    <ItemTemplate> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="Game Submisstion" onclick='ShowGameSubmission()'>  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="Member Directory">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="Pager">  
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="&nbsp;&nbsp;Members Online" ImageUrl="../Images/panelbars/users.png">  
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        <ol:OnlineList ID="onlineUsers" runat="server" /> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                          
                    </Items> 
                    <ExpandAnimation Type="Linear" Duration="150"></ExpandAnimation> 
                </telerik:RadPanelBar> 
            </div> 
        </div> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
            <Windows> 
                <telerik:RadWindow runat="server" ID="radDice" Width="450" Height="520px" ReloadOnShow="true" 
                    Left="200px" Title="Dice Roller" Skin="Telerik" Modal="false" VisibleStatusbar="false">  
                </telerik:RadWindow> 
                <telerik:RadWindow runat="server" ID="radGame" Width="600" Height="700px" Skin="Telerik" 
                    ReloadOnShow="true" Left="200px" Top="10px" Title="NewGame Submission">  
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
            <script type="text/javascript">  
            function ShowDiceRoller()  
            {  
                var wnd = window.radopen("DieRoller.aspx", "radDice");  
                return false;               
            }  
            function ShowGameSubmission()  
            {  
                var wnd = window.radopen("NewGame.aspx", "radGame");  
                return false;   
            }    
              
            function SetCookie(sender, e)  
            {  
                  
                //alert(e.get_item().get_text());  
                //alert(e);  
            }                  
            </script> 
 
        </telerik:RadCodeBlock> 
    </asp:ContentPlaceHolder> 

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 06 Aug 2008, 12:48 PM
Hi Sean ,

I tested the provided code but I was not able to reproduce the problem - please examine the attached test project. The RadWindow shows as expected, with the set skin and sizes.

That is why I assume that the problem comes from some other code in your original project, e.g another RadWindowManager with a RadWindow with the same name declared, etc. Since I am not able to examine the problem locally, I cannot tell you its particular reason.

Would you please either modify the attached project or prepare a new, reproduction one, which is fully runnable? Once you have done this, open a new support ticket and send it to me along with a detailed explanation of the reproduction steps, some screenshots and the information about the used browser? Once I receive this information, I will do my best to help. 

Regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sean
Top achievements
Rank 2
answered on 11 Aug 2008, 01:38 AM
So I have done a bit more checking. I have a UserControl that is loaded into the master page. The master page has a RadWindowManager with two RadWindows. The UserControl has a radWindowManager with a single window.

the master page looks like:

        <telerik:RadWindowManager ID="radMasterManager" runat="server">  
            <Windows> 
                <telerik:RadWindow runat="server" ID="winNewGame" Width="600" Height="700px" Skin="Telerik" 
                    ShowContentDuringLoad="false" ReloadOnShow="true" Left="200px" Top="10px" Title="New Game Submission">  
                </telerik:RadWindow> 
                <telerik:RadWindow runat="server" ID="winDice" Width="450" Height="520px" ReloadOnShow="true" 
                    ShowContentDuringLoad="false" Left="200px" Title="Dice Roller" Skin="Telerik" 
                    Modal="false" VisibleStatusbar="false">  
                </telerik:RadWindow> 
               
            </Windows> 
        </telerik:RadWindowManager> 

The UserControl looks like:

        <telerik:RadWindowManager ID="radOnlineUserManager" runat="server">  
            <Windows> 
                <telerik:RadWindow ID="winUser" runat="server" ShowContentDuringLoad="false" Skin="Telerik" 
                    Height="800px" Width="705px" Top="2px" Left="255px" ReloadOnShow="true" VisibleStatusbar="false">  
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 


In this configuration, the userControl renders corrctly, but neither of the master page windows render as desired. IfI hide the user control, the master page windows then render fine.

I moved the UserControl window to the master page and adjusted my window.radopen to read:

window.parent.window.radopen("OnlineUsers.aspx", "winUser") and all windows render correctly.

Is this a known issue?

Thanks for listening!

Sean
Electronic Arts, Orlando FL
0
Accepted
Georgi Tunev
Telerik team
answered on 12 Aug 2008, 01:02 PM
Hi Sean,

Yes, as Svetlina said, when you have multiple RadWindowManagers on the page, such behavior can occur. The reason for it is that radopen, radprompt, radconfirm and radalert use the first rendered RadWindowManager on the page and every RadWindowManager "knows" only about the RadWindows that are declared in it. That is why in scenarios like these, it is better to use the ASP.NET AJAX's find() method to get a reference to the control and then to use RadWindow's client-side API (setUrl(), show()) to open it.



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sean
Top achievements
Rank 2
answered on 12 Aug 2008, 01:32 PM
Thanks Georgi/Svetlina,

I apreciate your time.

Sean
Electronic Arts, Orlando FL
Tags
Window
Asked by
Sean
Top achievements
Rank 2
Answers by
Svetlina Anati
Telerik team
Sean
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or