I am trying to use a LoadingPanel along with an AJAX callback over top of a ListView control and can't seem to get it to display. No errors occur and the AJAX callback works fine, but the loading panel never shows. I even tried using the old school "<font size='7'>UPDATING</font>" trick to see if I could see it flash anywhere, and still nothing. I had a call to make the thread sleep for 2500ms just to test the visibility and still nothing. Here is the markup, any suggestions?
As a side note, you'll notice I am specifying the ClientID of the RadAJAXManager control declaritively instead of using the ClientID property. Whenever I try using ClientID with <%= %> I get the infamous "Controls Collection cannot be modified.." error. If I use <%# %> as Rick Strahl suggests, the value is simply null so the $find function looks like $find('') which does me no good. If anyone has a workaround for that issue it would be much appreciated!
| <asp:ListView runat="server" ID="lsHours"> |
| <LayoutTemplate> |
| <table id="tw" runat="server" class="yui-grid"> |
| <tr> |
| <th> </th> |
| <th>Day</th> |
| <th>Hours</th> |
| </tr> |
| <tr id="itemPlaceholder" runat="server" /> |
| </table> |
| </LayoutTemplate> |
| <ItemTemplate> |
| <tr valign="top" class='<%# Container.DataItemIndex % 2 == 0 ? "row" : "altrow" %>'> |
| <td width="45"> |
| <input type="button" onclick="javascript:openWindow('<%#Eval("Day") %>'); return false;" value="Edit" class="smallbutton" /> |
| </td> |
| <td width="150" nowrap="nowrap"><strong><%# Eval("Day") %></strong></td> |
| <td><strong><%#Eval("Hours") %></strong></td> |
| </tr> |
| </ItemTemplate> |
| </asp:ListView> |
| <script language="javascript" type="text/javascript"> |
| function openWindow(pDay) { |
| var oWnd; |
| oWnd = window.radopen("modals/hoursmaint.aspx?Day=" + pDay, "RadWindow1") |
| oWnd.Center(); |
| } |
| function HoursModifiedCallback(args) { |
| var ajaxManager = $find('ctl00_cpContent_RadAjaxManager1'); |
| ajaxManager.ajaxRequest(args); |
| } |
| </script> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleOnPageLoad="false" Behaviors="Close, Reload" Modal="true" /> |
| <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" EnableHistory="True" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="lsHours" LoadingPanelID="LoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1"> |
| <font size="7">UPDATING</font> |
| </telerik:RadAjaxLoadingPanel> |
As a side note, you'll notice I am specifying the ClientID of the RadAJAXManager control declaritively instead of using the ClientID property. Whenever I try using ClientID with <%= %> I get the infamous "Controls Collection cannot be modified.." error. If I use <%# %> as Rick Strahl suggests, the value is simply null so the $find function looks like $find('') which does me no good. If anyone has a workaround for that issue it would be much appreciated!