0

In the parent page, it had a preview button to prompt a radwindow.

How can I refresh the grid in parent page when user click the Close [X] button of the radwindow.

The radwindow generate in 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
Joe Yan
  • 2,025
  • 8
  • 43
  • 62

1 Answers1

0

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 initiate a partial postback that will update the grid. Note that a lot of the code is in the main page where the grid is, not in the content page loaded in RadWindow.

This approach for opening a RadWindow from the code-behind is better in case you cannot use the client-side logic from the demo: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx.

rdmptn
  • 5,413
  • 1
  • 16
  • 29