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

RadWindow Close from Client

1 Answer 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prasanth100
Top achievements
Rank 1
Prasanth100 asked on 22 May 2013, 11:46 AM
Hello Experts,
  My Senario : I have opened RadWindow from javascript,when i click on Close (x) button,it should refresh the parent page.
How to accomplish this.

     I have opened the RadWindow from javascript like the following:
      <script type="text/javascript">
      
      function EditList(CustomerID, ID) {
       // window.RadOpen("CustomerResults.aspx?CustomerID=" + CustomerID + "ID=" + ID);
        
       var oManager = window.radopen("CustomerResults.aspx?CustomerID=" + CustomerID + "&ID=" + ID, "RadEditWindow");
     
       oManager.setSize(900,500); //Width, Height
       oManager.center();
       //oManager.ReloadOnShow = true;
       oManager.set_reloadOnShow(true);
       oManager.set_showContentDuringLoad(true);
     // oWnd.set_title(Title);
       

        return false;
    }
  </script>

Following is the Design Page
---------------------------------------
 <script type="text/javascript">
      
      function EditList(CustomerID, ID) {
       // window.RadOpen("CustomerResults.aspx?CustomerID=" + CustomerID + "ID=" + ID);
        
       var oManager = window.radopen("CustomerResults.aspx?CustomerID=" + CustomerID + "&ID=" + ID, "RadEditWindow");
     
       oManager.setSize(900,500); //Width, Height
       oManager.center();
       //oManager.ReloadOnShow = true;
       oManager.set_reloadOnShow(true);
       oManager.set_showContentDuringLoad(true);
     // oWnd.set_title(Title);
       

        return false;
    }
  </script>


<script type="text/javascript">
    function RefreshParentPage() {
         //GetRadWindow().BrowserWindow.location.reload();
        top.location.href = top.location.href;

    }
</script>

      
 <asp:GridView ID="GvProp" runat="server" OnRowDataBound="GvProp_OnRowDataBound">
 <Columns>    
 <asp:TemplateField>
 <ItemTemplate>
 <asp:LinkButton ID="lbtMore" runat="server" Text="Edit"></asp:LinkButton>
 </ItemTemplate>
 </asp:TemplateField>
       </Columns>
 </asp:GridView>
 
      <telerik:RadWindow ID="RadEditWindow" runat="server" Height="500px" Width="900px"
            EnableShadow="true"  VisibleOnPageLoad="false" VisibleStatusbar="false"  Title="Matched Properties"
            ShowContentDuringLoad="false" Behaviors="Close,Pin" ReloadOnShow="true" OnClientClose="RefreshParentPage"
          NavigateUrl='<%# String.Format("CustomerResults.aspx?CustomerID={0}", _CustomerIDs) %>'> <%--OpenerElementID="btnRunMatch"--%>
      </telerik:RadWindow>    


Here is the Code Behind Page:
--------------------------------------------
 protected void GvProp_OnRowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {

                       
                        lbtMores.Attributes["href"] = "#";
                        lbtMores.Attributes["onclick"] = String.Format("return EditList('{0}','{1}');", _CustomerID, rowData.ID);
                        lbtMores.Visible = true;
                        RadEditWindow.OnClientClose = "RefreshParentPage";
                   
            }
        }

Thanks in Advance.

1 Answer, 1 is accepted

Sort by
0
msigman
Top achievements
Rank 2
answered on 22 May 2013, 07:53 PM
Tags
General Discussions
Asked by
Prasanth100
Top achievements
Rank 1
Answers by
msigman
Top achievements
Rank 2
Share this question
or