Treeview in Modal Dialog does not load in Chrome

2 posts, 0 answers
  1. Andy
    Andy avatar
    9 posts
    Member since:
    Nov 2006

    Posted 03 Jul 2009 Link to this post

    Hi,

    I am trying to display a RadTreeView (build 2008.3.1314.20) in a modal window in Google Chrome (build 2.0.172.33), but the treeview doesn't appear to load. Sample code below (code tested and working in IE7/8, FF3, Safari 4):

    Default.aspx
    <%@ Page Language="C#" AutoEventWireup="true" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
    </head> 
    <body> 
        <form id="form1" runat="server"
         
        <script type="text/javascript"
            //<![CDATA[
            function openModalTree()
            {
                window.showModalDialog("/TreeView.aspx", "height:400px; width:400px; center:yes;");
                return false;
            }
            function openModelessTree()
            {
                window.open("/TreeView.aspx", "height:400px; width:400px; center:yes;");
                return false;
            }
            //]]> 
        </script> 
         
         
        <asp:ScriptManager ID="sm1" runat="server" /> 
         
        <asp:Button ID="btnModal" runat="server" Text="View in Modal" OnClientClick="return openModalTree();" /><br /> 
        <asp:Button ID="btnNormal" runat="server" Text="View in Modeless" OnClientClick="return openModelessTree();" /> 
         
        </form> 
    </body> 
    </html> 
     

    TreeView.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %> 
     
    <script runat="server"
        const int MAX_DEPTH = 2
        const int NODES_PER_LEVEL = 10
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            BindNodes(null, NODES_PER_LEVEL, MAX_DEPTH); 
        } 
     
        private void BindNodes(RadTreeNode parentNode, int count, int depth) 
        { 
            for (int i = 0; i < count; i++) 
            { 
                var node = new RadTreeNode("This is node " + i + " at depth " + (MAX_DEPTH - depth)); 
                if (parentNode != null) 
                    parentNode.Nodes.Add(node); 
                else 
                    tv1.Nodes.Add(node); 
     
                if (depth > 0) 
                    BindNodes(node, count, depth - 1); 
            } 
        } 
    </script> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
    </head> 
    <body> 
        <form id="form1" runat="server"
            <asp:ScriptManager ID="sm1" runat="server" /> 
            <Telerik:RadTreeView ID="tv1" runat="server" Width="100%" Height="100%" /> 
        </form> 
    </body> 
    </html> 
     

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 03 Jul 2009 Link to this post

    Hello Andy,

    I confirm that window.showModalDialog does not work in Chrome 2.0. I tried opening http://www.google.com with the same results - the window shows "waiting for www.google.com" forever. It appears that other users have encountered this problem as well. Here is a forum thread discussing the same issue.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top