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

[Solved] Rad Grid Does Not Refresh Inside User Cotnrol

1 Answer 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suresh Mishra
Top achievements
Rank 1
Suresh Mishra asked on 13 Sep 2009, 07:07 PM
Hi,

I have a rad grid inside a user control and I need to refresh it upon return from a modal window.  I know that I can use this code reproduced below.  However, I can not use the ajaxRequest method of the RadAjaxManager because it is declared on the aspx page, not the ascx page where I need to refresh the grid.  If I were to use the RadAjaxManagerProxy object, it does not have the AjaxRequest method.  

How should I refresh the grid on the ascx page?

Thanks.

Suresh
            function refreshGrid(arg)
            {
             if(!arg)
             {
             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");            
                }
                else
                {
             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");            
                }
            }
            function RowDblClick(sender, eventArgs)
            {
             window.radopen("EditFormCS.aspx?EmployeeID=" + eventArgs.getDataKeyValue("EmployeeID"), "UserListDialog");
            }


1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 14 Sep 2009, 02:55 PM
Hello Suresh,

To trigger a client-side ajaxRequest from a use page I recommend that you get the current RadManager using RadAjaxManager.GetCurrent(Page). Your code should look like:
       function refreshGrid(arg) 
            { 
             if(!arg) 
             { 
               $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind");             
             } 
             else 
             { 
               $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate");             
             } 
            } 

For more information please take a look at the AJAX Manager Proxy help topic.

Sincerely yours,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Suresh Mishra
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or