RadWindow Close from Client

2 posts, 0 answers
  1. Prasanth100
    Prasanth100 avatar
    17 posts
    Member since:
    Oct 2012

    Posted 22 May 2013 Link to this post

    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.

  2. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 22 May 2013 Link to this post

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top