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

GetRadWindowManager().GetWindowByName("RadwindowName") returns null

2 Answers 227 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shamjith
Top achievements
Rank 1
Shamjith asked on 11 Dec 2009, 03:23 PM
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<script type="text/javascript">  
    function ShowMessage(url) {  
        var win = GetRadWindowManager().GetWindowByName("Message");  
        win.SetUrl(url);  
        win.SetSize(600, 430);  
        win.Show();  
    }  
</script> 
 
<span style="font-size:medium; font-weight:bold"><asp:Label ID="lblTitle" runat="server" Visible="false"></asp:Label></span>  
<br /><br /> 
<asp:GridView ID="gvMessages" runat="server" AllowPaging="True" AllowSorting="False" AutoGenerateColumns="False" onpageindexchanging="gvMessages_PageIndexChanging">  
    <PagerSettings Mode="NextPreviousFirstLast"   
        FirstPageImageUrl="~/DesktopModules/Message/Images/first.gif"   
        FirstPageText="First"   
        LastPageImageUrl="~/DesktopModules/Message/Images/last.gif"   
        LastPageText="Last"   
        NextPageImageUrl="~/DesktopModules/Message/Images/next.gif"   
        NextPageText="Next"   
        PreviousPageImageUrl="~/DesktopModules/Message/Images/previous.gif"   
        PreviousPageText="Previous" /> 
    <Columns> 
        <asp:TemplateField> 
            <ItemTemplate> 
                <div id="divMessageTitle" style="overflow: hidden; width: 150px; text-overflow: ellipsis" Wrap> 
                    <asp:Literal ID="ltMessageTitle" runat="server" Text='<%# FormatTitle(Eval("MessageTitle"), Eval("MessageStyle")) %>'></asp:Literal> 
                </div> 
                <href='#' style="font-size:10px" onclick="ShowMessage('<%# Page.ResolveUrl("~/DesktopModules/Message/Message.aspx?msgid=" + Eval("MessageId")) %>');">[more]</a> 
                <br /> 
                <br /> 
            </ItemTemplate> 
        </asp:TemplateField> 
    </Columns> 
</asp:GridView> 
<asp:Literal ID="ltContent" runat="server"></asp:Literal> 
<br /><br /> 
<telerik:RadWindowManager ID="Singleton" runat="server" Skin="Outlook">  
    <Windows> 
        <telerik:RadWindow ID="Message" runat="server" Modal="True" Behavior="Close" /> 
    </Windows> 
</telerik:RadWindowManager>
 

This is the code which I am using to show a popup on radwindow through javascript but when I run the page the var win = GetRadWindowManager().GetWindowByName("Message"); returns null

please help me on this, the version I am using is 2009.2.826.35


Regards,

Roshin.K

2 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 16 Dec 2009, 12:11 PM
Hi Shamjith,

I followed your scenario and prepared a sample project for you using your code. In it the window is shown successfully on my side.

Please take a look at it and let me know what are the differences on your side.

Greetings,

Mira
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
niraj
Top achievements
Rank 1
answered on 14 Oct 2014, 04:06 PM
In new version of telerik you can get the rad windows by $find("<%= RadWindow1.ClientID %>"). This solved the issue with getting null back.

Hope this helps.
Tags
GridView
Asked by
Shamjith
Top achievements
Rank 1
Answers by
Mira
Telerik team
niraj
Top achievements
Rank 1
Share this question
or