RadAjaxManagerProxy inside a dynamically-loaded User Control is not working

1 posts, 0 answers
  1. Tyler
    Tyler avatar
    4 posts
    Member since:
    Oct 2017

    Posted 09 Nov Link to this post

    Hey all.

    I'm creating a page that is identical to this example:

    https://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/how-to/radajax-and-webusercontrols

    In one of my user controls, I have a few controls/buttons that need to be AJAXified. I included a RadAjaxManagerProxy and stripped my example down to its most basic state, which can be seen below.

    When a postback is caused, the event is seemingly bubbling up to the container page. In some cases, the entire control flickers. Additionally, I applied some JavaScript that adds text on my user control. When I click the AJAXified RadGrid, the text is gone. This leads me to believe the entire user control is being reloaded, though the ASP controls maintain their values.

     

    <telerik:RadGrid runat="server" ID="rgOffers" Skin="Silk" AutoGenerateColumns="false" OnNeedDataSource="rgOffers_NeedDataSource" OnItemCommand="rgOffers_ItemCommand">
                <ClientSettings Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="true">
                    <ClientEvents OnRowSelected="onOfferSelected" />
                </ClientSettings>
                <MasterTableView>
                    <Columns>
                        ...
                    </Columns>
                </MasterTableView>
    </telerik:RadGrid>

     

    <asp:Panel runat="server" ID="pnlSelectedOffer" Visible="false">

        Testing!

    </asp:Panel>

     

    <telerik:RadAjaxManagerProxy runat="server" ID="ramp">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgOffers">
                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="rgOffers" LoadingPanelID="ralp" />
                    <telerik:AjaxUpdatedControl ControlID="pnlSelectedOffer" LoadingPanelID="ralp" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel runat="server" ID="ralp" Skin="Silk"></telerik:RadAjaxLoadingPanel>

     

    protected void rgOffers_ItemCommand(object sender, GridCommandEventArgs e)
    {

        if (e.CommandName == "RowClick") {

            pnlSelectedOffer.Visible = true;

            RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("alert("clicked.");");

        }

    }

Back to Top