This is a migrated thread and some comments may be shown as answers.

RadAjaxManager updates all controls on post-back

3 Answers 195 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 19 Sep 2011, 01:33 AM
I am trying to configure RadAjaxManager to update some RadDockZones in the page while not updating an IFrame.

When I configure RadAjaxManager like below, everything works fine and the RadDockZones do not cause the IFrame to update.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="pnlDockZoneLeft">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlDockZoneContent" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="pnlDockZoneContent">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlDockZoneLeft" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

If I attempt to add another AjaxSetting to update the IFrame when the filter panel is updated, like so:
<telerik:AjaxSetting AjaxControlID="filterPane">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="pnlIFrame" />
    </UpdatedControls>
</telerik:AjaxSetting>

Any update to any of the Ajaxified controls causes the IFrame to update and lose its settings. Here is part of the response body from the post-back when I click on one of the RadDocks:
504|updatePanel|pnlDockZoneContentPanel|<div id="pnlDockZoneContent">
     
                                    <div id="dockZoneContent" class="RadDockZone RadDockZone_Outlook rdVertical" style="border-width:0px;min-width:10px;min-height:10px;display:none;">
        <!-- 2011.2.712.35 --><div class="RadDock RadDock_Default rdPlaceHolder" id="dockZoneContent_D" style="display:none;">
            <!-- -->
        </div><input id="dockZoneContent_ClientState" name="dockZoneContent_ClientState" type="hidden" />
    </div>
                                 
</div>|362|updatePanel|pnlIFramePanel|<div id="pnlIFrame" class="content" style="width:100%;">
     
                                    <iframe id="IFrame1" name="IFrame1" frameborder="0" marginwidth="0" scrolling="no" style="margin: 0; height: 525px" width="100%" height="100%" src="Profile.aspx?Redirect=True">
                                    </iframe>
                                 
</div>

Is there any way to set RadAjaxManager to only update panels that are in the UpdatedControls list and leave the ones that are ajaxified but not in the UpdatedControls list?

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 19 Sep 2011, 01:35 PM
Hello Jack,

What does your page markup look like?
0
Jack
Top achievements
Rank 1
answered on 19 Sep 2011, 01:56 PM
Essentially it boils down to this:
<td valign="top">
    <asp:Panel ID="LeftPane" runat="server" Width="172px" ScrollBars="none">
        <div>
            <table>
                <tr>
                    <td class="headerbg">
                        Navigation
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pnlTabsModule">...</asp:Panel />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pnlDockZoneLeft">...</asp:Panel>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</td>
<td valign="top" align="left">
    <asp:Panel ID="MiddlePane" runat="server" ScrollBars="None" Width="816px" BackColor="#F8F8FF">
        <asp:Panel ID="filterPane">...</asp:Panel>
        <asp:Panel ID="pnlDockZoneContent">...</asp:Panel>
        <asp:Panel ID="pnlIFrame" runat="server" Width="100%" CssClass="content">
            <iframe name="IFrame1" id="IFrame1" runat="server" frameborder="0" marginwidth="0"
                scrolling="no" style="margin: 0; height: 525px" width="100%" height="100%" src="Profile.aspx?Redirect=True">
            </iframe>
        </asp:Panel>
    </asp:Panel>
</td>

With panels in multiple places I had to resort to using RadAjaxManager, but once I add the pnlIFrame into it everything starts reloading on every callback.
0
Iana Tsolova
Telerik team
answered on 22 Sep 2011, 08:43 AM
Hello Jack,

When you ajaxify container controls with RadAjaxManager in a manner where the container is initiator, then this container is wrapped in ajax panel which behaves like ASP:UpdatePanel with UpdateMode set to conditional. That is why each of the ajaxified panels in your case is updated on every ajax request. To overcome the issue, you can use RadAjaxPanel controls instead.

All the best,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Ajax
Asked by
Jack
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Jack
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or