Wednesday, March 28, 2012

Transparent Popcontrol extender problems

Hi, I am having an odd problem. I have about the simplest test case of a popupcontrol exenter I can think of below. I added a combo box below the extended textbox to illustrate the problem. The issue is that when I click on the textbox to display the radiobutton list, the back ground of the radion button list is transparent. How come? It doesn't matter what control is underneath the textbox. The radiobutton list is always displayed with a transparent background. What is the magic dust I am missing?

Thanks ... Ed

<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<asp:TextBox ID="textbox1" runat="server" Width="200"></asp:TextBox><br />
<asp:DropDownList ID="DropDownList1" runat="server" Width="216px">
<asp:ListItem>Item1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
</asp:DropDownList>
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" CommitProperty="value"
CommitScript="e.value += ' - do not forget!';" PopupControlID="Panel1" Position="Bottom"
TargetControlID="textbox1">
</ajaxToolkit:PopupControlExtender>

</div>
<asp:Panel ID="Panel1" runat="server" >
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem Text="Walk dog"></asp:ListItem>
<asp:ListItem Text="Feed dog"></asp:ListItem>
<asp:ListItem Text="Feed cat"></asp:ListItem>
<asp:ListItem Text="Feed fish"></asp:ListItem>
<asp:ListItem Text="Cancel" Value=""></asp:ListItem>
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</form>

The default value of background-color style is transparent, so you will get transparent radio button lists. You can specify a color explicitly to make this work.

Thanks so much. That was it. Although it raises a question. I set the background color of the underlying panel to white. How come the what was under the panel showed through the panel and through the radiobuttonlist?

Thanks ... Ed

No comments:

Post a Comment