Link to home
Start Free TrialLog in
Avatar of meiprogram
meiprogram

asked on

DropDownList inside UpdatePanel won't show

I have a dropdownlist inside an update-panel,

It's visible property is set to false and then I change it to true later but it will not show the dropdown?
<tr id="trTopics" runat="server" visible="false" >
	        <td colspan="3" class="PSRFItem">
		        <asp:UpdatePanel ID="updTopics" runat="server" >
			        <ContentTemplate>
				        <asp:Label ID="lblTopicError" runat="server" Visible="false" ForeColor="Red" CssClass="PIFErrorMessage" Text="You must specify the speakers intended topic." /><br />
				        <span style="color: Red; font-weight:bold; font-size: 18px;">*</span>
				        <asp:Label ID="lblTopic" runat="server" Text="What Topic would you like the speaker to present?" /><br />
				        <asp:DropDownList ID="ddlTopics" runat="server" AutoPostBack="True" />
			        </ContentTemplate>
		        </asp:UpdatePanel>
	        </td>
        </tr>

Open in new window

Avatar of Bill Nolan
Bill Nolan
Flag of United States of America image

From your code it looks like its 'Visible' property is NOT set to false, though the enclosing table's visibility is false.  Not sure if you noticed this or not, but if you are simply setting the DropDownList visibility to true it won't matter.
the problem is with your tr tag. it is the parent to the dropdownlist, so when it is not visible, everything inside it will not be visible.

change

<tr id="trTopics" runat="server" visible="false" >

Open in new window


to

<tr id="trTopics" runat="server">

Open in new window

Avatar of meiprogram
meiprogram

ASKER

I know it will work if I take the visible out of the tr tag.  I need to hide that row and show it only in certain cases depending on the users input on other controls
ASKER CERTIFIED SOLUTION
Avatar of meiprogram
meiprogram

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Figured it out myself.
Obviously users will not be able to make it visible again via the list.

Btw, your original problem description was inaccurate.