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

Can't Call OnAjaxRequest in User Control

2 Answers 78 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 09 Dec 2010, 05:37 AM
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 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 09 Dec 2010, 01:02 PM
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.
0
Kevin
Top achievements
Rank 1
answered on 09 Dec 2010, 02:33 PM
Thanks, that example did the trick.
Tags
Ajax
Asked by
Kevin
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or