Monday, March 26, 2012

UpdatePanel + DataList (not updating)

I have a DataList inside of an UpdatePanel, with an update trigger from a drop down list. The DataList is data bound to a IDataReader upon postback. I'm not getting an update. When I remove the UpdatePanel, things work as expected. Here's the code:

<asp:Panel ID="pnlFilters" runat="server" style='margin: 0px auto 0px auto;text-align: center;'>
<asp:Label ID="lblProducts" runat="server" Text="Rovion Products:" />
<asp:DropDownList ID="ddlProducts" runat="server" style='margin-right: 50px;' OnSelectedIndexChanged='ddl_SelectedIndexChanged' AutoPostBack='true' />
<asp:Label ID="lblCategories" runat="server" Text="Vertical Categories:" />
<asp:DropDownList ID="ddlCategories" runat="server" OnSelectedIndexChanged="ddl_SelectedIndexChanged" AutoPostBack="true" />
</asp:Panel>
<br />
<br />
<atlas:UpdatePanel ID="upDemos" runat="server">
<ContentTemplate>
<atlas:UpdateProgress ID="uppDemos" runat="server">
<ProgressTemplate>
<asp:Panel id="pnlLoader" runat="server" style='margin: 0px auto 0px auto;text-align: center;'>
<asp:Image ID="imgLoader" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
</asp:Panel>
<br />
</ProgressTemplate>
</atlas:UpdateProgress>
<asp:DataList ID="dlDemos" runat="server" CellPadding="10" GridLines="None" RepeatColumns="3" ShowFooter="False" ShowHeader="False" BorderColor="#89a3b2" BorderWidth="2px" style='margin: 0px auto 0px auto;text-align: center;'>
<ItemTemplate>
<asp:HyperLink ID="hlThumbnail" runat="server" ImageUrl='<%# Eval("ThumbnailURL") %>' NavigateUrl='<%# GetNavigateUrl() %>' Target="_new" />
<br />
<br />
<b>Title:</b> <%# Eval("Title") %>
<br />
<b>Product:</b> <%# Eval("ProductName") %>
<br />
<b>Vertical:</b> <%# Eval("CategoryName") %>
</ItemTemplate>
</asp:DataList>
</ContentTemplate>
<Triggers>
<atlas:ControlValueTrigger ControlID="ddlCategories" PropertyName="SelectedValue" />
<atlas:ControlValueTrigger ControlID="ddlProducts" PropertyName="SelectedValue" />
</Triggers>
</atlas:UpdatePanel>

Any suggestions? Thanks! :-)

I really need some advice on this problem. I have a ScriptManager w/ partial rendering enabled. What happens is the UpdateProgress graphic will show up when I change the selection of the drop down list (like it's posting back), but 1) the UpdateProgress never goes away, and 2) the DataList is never updated...so everything in the UpdatePanel is not being updated, and I don't know why :-(

Does anyone have a clue why this would be occurring? Thanks for your time!


Hi~This might be the explanation of your problem. You may try event trigger other than value trigger, e.g

<atlas:ControlEventTriggerControlID="ddlCategories"EventName="SelectedIndexChanged"/>

No comments:

Post a Comment