views:

66

answers:

2

When launching a modal radwindow in IE 6, any dropdown's visible on the parent page are hidden. Once they are hidden, they are gone even after the modal has been closed. These are pure ASP.NET dropdownlists. There is nothing special about the dropdown's that are hidden - I can add new dropdowns to the page with nothing in them, and they still go away on launch. Any ideas out there?

I am using ASP.NET 3.5, 2009 Q3 of Telerik's ASP.NET AJAX Controls, testing with IE 6 (6.0.2600) on a virtual machine running Windows 2000.

While the issue was initially encountered on a much more complex page, I have created a brand new page, no css, just bare-bones elements, and it still happens in IE 6.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits=".WebForm1" %>

<%@ 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"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="manager1" runat="server">
        </telerik:RadScriptManager>

        <asp:DropDownList ID="ddl1" runat="server">
            <asp:ListItem Value="1">Item 1</asp:ListItem>
            <asp:ListItem Value="2">Item 2</asp:ListItem>
            <asp:ListItem Value="3">Item 2</asp:ListItem>
        </asp:DropDownList>
        <asp:Button ID="btn1" runat="server" OnClientClick="ShowModal(); return false;" Text="click" />
    </div>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

        <script type="text/javascript">
            function ShowModal() {
                var wnd = radopen('<%=ResolveUrl("~/register.aspx") %>', null);
                wnd.set_modal(true);
                wnd.center();
                wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize);
                wnd.show();
                return false;
            }
        </script>

    </telerik:RadScriptBlock>
    </form>
</body>
</html>

It appears that when showing the radwindow with modal being set to true, the dropdown's visibility attribute is being set to hidden. With modal being set to false, the dropdown is fine... Thanks

Dan Appleyard

A: 

What version of ASP.NET are you running, and what version of Teleriks Rad Window? I have had a lot of issues with older versions, but their new versions seem to be working great.

I'd test it out on a separate page.

  1. Create a new page with a few DDL's randomly filled
  2. Add a basic rad window control to it - and hook it up so it can be invoked

See if you can recreate the issue. If you can't, then it's most likely something with CSS, JavaScript or the HTML markup.

Edit: Also remember IE6 has drop down issues. Usually the main issue is the dropdown list is always above every other control, but I wouldn't hold my breath if it's something browser related.

Ryan Ternier
I added an example of a really simple page where it is still happening...
Dan Appleyard
A: 

Hi Dan, We've talked in Telerik's forum and I just wanted to add the info here as it could be of help for other users:

The problem here is with the logic. With your code you do the following:

  1. open the RadWindow control
  2. set its modal property to true. In this case we are hiding the dropdowns in IE6.
  3. set the behaviors of the control
  4. center the window (I assume you do this to redraw the window after setting its behaviors).
  5. You call the show() method again. Because you are calling show() for a window that is modal, the code that hides the dropdowns is run again - that is the reason for them not being visible after the window is closed.

To avoid the problem, I suggest not to call show() again, but to call the center() method last.

RadWindow explicitly hides the dropdowns in IE6 because prior to IE7, dropdowns and list items were heavyweight objects that were rendered above all DHTML elements on the page, including the modal background of RadWindow. This made possible for users to still use the dropdowns on the parent page even if a modal RadWindow was shown. To avoid that we disable the dropdowns if the browser is IE7+ and hide them completely if it is IE6.

GeorgiTunev