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

[Solved] Updating RadGrid (AJAX) on parent page using OnClientClose

1 Answer 140 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
DogEars
Top achievements
Rank 2
DogEars asked on 02 Mar 2008, 07:28 PM
I've successfully managed to force the entire page to reload using the OnClientClose, but I'm having issues making just the RadGrid Prom refresh.

Here is my current code:

    <telerik:RadAjaxManager ID="RadAjaxManagerDefault" runat="server" EnableAJAX="true"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManagerDefault"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Width="800px" Height="600px" 
        Modal="true"
        <Windows> 
            <telerik:RadWindow runat="server" ID="UserSelectDialog" OnClientClose="OnClientClose"  ReloadOnShow="true" /> 
        </Windows> 
    </telerik:RadWindowManager> 

      function OnClientClose(sender,args)   
    {   
        //window.location.reload();//- will reload the page (equal to pressing F5)   
        //windowwindow.location.href = window.location.href;// - will refresh the page by reloading the URL   
        window["<%= RadAjaxManagerDefault.ClientID %>"].AjaxRequest('RefreshGrid');  
 
    }   

    Protected Sub RadAjaxManagerDefault_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManagerDefault.AjaxRequest 
        If e.Argument = "RefreshGrid" Then 
            RadGrid1.Rebind() ' Never gets here! 
        End If 
    End Sub 

Any ideas?


1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 04 Mar 2008, 08:47 AM
Hello DogEars,

You should access the manager through $find() method in Prometheus. I guess the JS error is just silently handled in OnClientClose event of the RadWindow.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
DogEars
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
Share this question
or