0

我尝试 从网格视图中的按钮打开NavigateUrl Telerik Windowupdate panel ,但我失败了,它根本没有打开窗口


我的 .aspx :

<asp:TemplateField HeaderText="details" ItemStyle-HorizontalAlign="Center">
       <ItemTemplate>
          <asp:ImageButton ID="ibtn_details" runat="server" ImageUrl="~/images/details.png"
          CommandArgument='<%#((GridViewRow)Container).RowIndex%>' CommandName="Get_details" />
       </ItemTemplate>
 </asp:TemplateField>

   <telerik:RadWindow runat="server" ID="radwin_popupdetails" NavigateUrl="PopUpDetail.aspx"
                Modal="true" InitialBehaviors="Maximize">
   </telerik:RadWindow>

 <script type="text/javascript">
            function openWinNavigateUrl() {
                $find("<%=radwin_popupdetails.ClientID %>").show();
            }
 </script>

我的 .cs :

 protected void gv_inbox_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int index = Convert.ToInt32(e.CommandArgument);

            if (e.CommandName == "Get_details")
            {

                Session["main_code"] = int.Parse(((HiddenField)gv_inbox.Rows[index].Cells[1].FindControl("HDN_MainCode")).Value);

                //System.Web.UI.ScriptManager.RegisterClientScriptBlock(UpdatePanel2, UpdatePanel2.GetType(), "Open window", "openWinNavigateUrl(); return false;", true);
               RadScriptManager.RegisterStartupScript(this, this.GetType(), "tabSelectedScript", "openWinNavigateUrl();", true);
            }
        }
4

1 回答 1