Can't Call OnAjaxRequest in User Control

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    3 posts
    Member since:
    Oct 2010

    Posted 08 Dec 2010 Link to this post

    Hi, I'm having issues executing a RadAjaxManager OnAjaxRequest.  I am following the "Window / Edit dialog for Radgrid" Window option demo in order to rebind a RadListView when data is added within the Rad pop up Window.  The difference between my layout and the example is I am using a master page architecture.  So I have a master page then and aspx page within the content and a user control within that aspx page.  My Rad Window is within the user control.  Since I have my RadAjaxManager within the master page I am unable to execute a command within my user control to rebind my RadListView within that user control.  How would I do this?


    ----- I am trying to execute the refreshGrid function below called from my RadWindow to rebind a radlist view.  My problem is my radajaxmanager is within a master page and my radlistview is in a user control.

            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadListView1/>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>


           function refreshGrid(arg)
           {
               if (!arg)
               {
                   $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
               }
            }


            protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
            {
                if (e.Argument == "Rebind")
                {
                    RadListView1.Rebind();

            }
  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 09 Dec 2010 Link to this post

    Hi Kevin,

    Take a look at the following help topic:

    http://www.telerik.com/help/aspnet-ajax/ajax-manager-proxy.html  (section: Accessing master manager client-side within WebUserControl/ContentPage )

    Hope it helps.

    All the best,
    Tsvetoslav
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Kevin
    Kevin avatar
    3 posts
    Member since:
    Oct 2010

    Posted 09 Dec 2010 Link to this post

    Thanks, that example did the trick.
Back to Top