How to refresh the grid of the parent page when radwindow closes?

On the parent page, he had a preview button to trigger a radward.

How to update the grid on the parent page when the user clicks the Close button [X] in the radword.

Rainbow code is generated in the code behind:

Protected Sub rtbMenu_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles rtbMenu.ButtonClick If e.Item.Value = "Preview" Then Dim url = "~/TrainingAdmin/SIMPER_view.aspx?SIMPER_ID=0&UserID=" & Request.QueryString("UserID") & "&From=" & RadDatePicker_ValidFrom.SelectedDate & "&To=" & RadDatePicker_ValidTill.SelectedDate Dim windowManager As New RadWindowManager() Dim window1 As New RadWindow() ' Set the window properties window1.NavigateUrl = url window1.ID = "RadWindow1" window1.Height = 750 window1.Width = 740 window1.Top = 140 window1.Left = 250 window1.AutoSize = False window1.VisibleTitlebar = True window1.VisibleStatusbar = False window1.VisibleOnPageLoad = True ' Set this property to True for showing window from code windowManager.Windows.Add(window1) Me.Form.Controls.Add(window1) ElseIf e.Item.Value = "Refresh" Then Response.Redirect("~/TrainingAdmin/SIMPER_details.aspx?userID=" & Request.QueryString("UserID")) End If End Sub 
0
source share
1 answer

Take a look here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window . This demo from Telerik shows how you can use the OnClientClose event of the RadWindow control to trigger a partial postback that will update the grid. Please note: most of the code is on the main page where the grid is, and not on the content page loaded in RadWindow.

This approach to opening RadWindow from code is better if you cannot use the client logic from the demo: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx .

0
source

All Articles