Could anyone help!
I have racked my brain trying to figure out how to refresh my grid on a radwindow close. It cannot be that complicated, but I just do not have the right combination.
My situation is a little different than the examples. I have looked at the demos:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window
and all the posts, but here is my problem.
I have a Master page with an ajax manager. I then have a content page that I launch the RadWindow. The content page has a AjaxManagerProxy:
I have this part (The VB on the Content Page)
Now, I need to figure out how to use the Proxy on the content page to call it:
I assume I would use the above javascript to initiate the ajax proxy request, and on my radwindow, simply call it onClientClose:
But I cannot fiure out how to get the proxy manager to call the VB subroutine. There is not a
OnAjaxRequest="RadAjaxManager1_AjaxRequest" for a AjaxProxy.
Does this make sense?
Is there anyone who would mind giving me a pointer? Surely this is used all the time!
Thanks,
~bg
I have racked my brain trying to figure out how to refresh my grid on a radwindow close. It cannot be that complicated, but I just do not have the right combination.
My situation is a little different than the examples. I have looked at the demos:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window
and all the posts, but here is my problem.
I have a Master page with an ajax manager. I then have a content page that I launch the RadWindow. The content page has a AjaxManagerProxy:
I have this part (The VB on the Content Page)
| Protected Sub RadAjaxManagerProxy1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) |
| Dim grid As Telerik.Web.UI.RadGrid = DirectCast(FindControl("RadMultiPage1").FindControl("PageSearch").FindControl("grdSearchRFS"), Telerik.Web.UI.RadGrid) |
| If e.Argument = "Rebind" Then |
| grid.MasterTableView.SortExpressions.Clear() |
| grid.MasterTableView.GroupByExpressions.Clear() |
| grid.Rebind() |
| ElseIf e.Argument = "RebindAndNavigate" Then |
| grid.MasterTableView.SortExpressions.Clear() |
| grid.MasterTableView.GroupByExpressions.Clear() |
| grid.MasterTableView.CurrentPageIndex = grid.MasterTableView.PageCount - 1 |
| grid.Rebind() |
| End If |
| End Sub |
<
telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
| function refreshGrid(arg) |
| { |
| if(!arg) |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); |
| } |
| else |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate"); |
| } |
| } |
I assume I would use the above javascript to initiate the ajax proxy request, and on my radwindow, simply call it onClientClose:
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="False" |
| VisibleStatusbar="False" Modal="True" Behaviors="Close, Resize, Move" Height="550px" |
| Width="1000px"> |
| <Windows> |
| <telerik:RadWindow ID="CallDetails" runat="server" Left="" NavigateUrl="RFSDetail.aspx" |
| Height="550px" Width="1000px" Style="display: none;" Title="RFS Detail" Top="" |
| OnClientClose="refreshGrid"> |
| </telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
But I cannot fiure out how to get the proxy manager to call the VB subroutine. There is not a
OnAjaxRequest="RadAjaxManager1_AjaxRequest" for a AjaxProxy.
Does this make sense?
Is there anyone who would mind giving me a pointer? Surely this is used all the time!
Thanks,
~bg
