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

RadAjaxManagerProxy trigger ajaxrequest after closing RadWindow

1 Answer 207 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Roel
Top achievements
Rank 1
Roel asked on 07 Aug 2008, 08:10 AM
Hi,

I am using Master/Content pages and put a RadAjaxManager in the masterpage and the RadAjaxManagerProxy in the content page.

In the contentpage is a RadGrid. I use RadWindow to edit a line in the RadGrid. After closing the RadWindow the RadGrid needs to refresh. Formely, when I didn't have the RadAjaxManager in the masterpage, but a RadAjaxManager in the contentpage, I could rebind the RadGrid using the following script

function refreshGrid()
{
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.AjaxRequest();
}

And in the code-behind

Protected Sub RadAjaxManager1_AjaxRequest( _
    ByVal sender As Object, _
    ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) _
Handles RadAjaxManager1.AjaxRequest

    Me
.gridItems.Rebind()

End
Sub

After which the grid is refreshed.

How do I proceed to get the same result with the use of the RadAjaxManagerProxy? I know I have to implement RadAjaxManager.GetCurrent(Page) somewhere, but I'm at a loss how to do this.

Regards,
Roel

 

1 Answer, 1 is accepted

Sort by
0
Roel
Top achievements
Rank 1
answered on 08 Aug 2008, 05:57 AM
Hi,

I figured it out myself.

In the page load event of the content page I added:

Dim AjaxManager As RadAjaxManager = CType(Me.Master.FindControl("RadAjaxManager1"), RadAjaxManager)
AddHandler
AjaxManager.AjaxRequest, AddressOf RadAjaxManager1_AjaxRequest
AjaxManager.AjaxSettings.AddAjaxSetting(AjaxManager, gridItems)

And I adjusted the following procedure to:

Protected Sub RadAjaxManager1_AjaxRequest( _
    ByVal sender As Object, _
    ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) 

    Me
.gridItems.Rebind()

End
Sub

Roel

Tags
Ajax
Asked by
Roel
Top achievements
Rank 1
Answers by
Roel
Top achievements
Rank 1
Share this question
or