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

RadAjaxManager causing all controls to do ajax

1 Answer 48 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 18 Dec 2008, 05:14 PM
Hello

I have a radajaxmanager that I set a button to do an ajax update on a panel.  The button is located in the panel (it needs to be since the enabled property changes during a certain state.  The ajax is working for the button I specified, but is also working for all the controls in the panel.  Here is an example:

<rad:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <rad:AjaxSetting AjaxControlID="btnRefreshGenerationStatus"
                <UpdatedControls> 
                    <rad:AjaxUpdatedControl ControlID="pnlGeneratePackage" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </rad:AjaxSetting> 
        </AjaxSettings> 
    </rad:RadAjaxManager> 
     
    <rad:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" style="margin-top: 57px;" Transparency="30"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
    </rad:RadAjaxLoadingPanel> 

and the panels code is:
<asp:Panel ID="pnlGeneratePackage" runat="server"
            <asp:Button ID="btnGeneratePackage" runat="server" Text="Generate Package" SkinID="ButtonLarge" /> 
            <asp:CheckBox ID="chkGenerateIndex" runat="server" Text="Generate Index" /> 
            <br /> 
            <asp:Literal ID="litGeneratePackageStatus" runat="server" Text="Status: " /> 
            <asp:Label ID="lblGeneratePackageStatus" runat="server" /> 
             
             
            <asp:Button ID="btnRefreshGenerationStatus" runat="server" Text="Refresh Package Generation" SkinID="ButtonLarge" /> 
             
            
            <br /> 
            <br /> 
            <asp:Button ID="lnkDownloadPackage" runat="server" Text="Download Package" Visible="false" /> 
        </asp:Panel> 

When I click the btnRefreshGenerationStatus button, it will do a ajax update on all the controls.  When I click the lnkDownloadPackage button, it also does an ajax update which I don't want.  I don't want the other buttons in that panel to do a ajax update. 

Where am I doing wrong here?

Thanks
Kevin

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 Dec 2008, 08:49 AM
Hello Kevin,

Please note that RadAjaxManager actually wraps the updated controls in UpdatePanels. Therefore the updated controls are behaving in the mentioned way.

It's possible to cancel the request on the RequestStarted client event. Your Panel control should update itself in order this to work.

Let us know if you need more information.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Kevin
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or