javascript - 通过模板字段打开 NavigateUrl 窗口

标签 javascript jquery asp.net ajax telerik

我尝试打开NavigateUrl Telerik Window从存在于更新面板中的 GridView 中的按钮,但我失败了,它根本不打开窗口

<小时/>

我的.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);
            }
        }

最佳答案

关于javascript - 通过模板字段打开 NavigateUrl 窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15612489/

相关文章:

javascript - 我将如何创建这样的扩展内容?

javascript - 显示使用 Spring、Spring Security、Hibernate、jQuery、Backbone、AJAX 的 web-app 的当前登录用户的名称

javascript - 使用 Google API 进行身份验证后无法获取访问和刷新 token

javascript - Bootstrap 4 : when navbar is collapsed li item is displayed horizontally next to navbar-brand

javascript - AngularJS 中的 ScrollTo 函数

asp.net - 如何将流excel文件转换为数据表C#?

javascript - 函数 openDialog() 设置宽度和设置高度 Google 电子表格

javascript - jQuery:添加基于单独标签元素的属性

asp.net - 如何在Vs code中使用命令行设置asp.net core启动项目

c# - 将 DbContext 解析为派生类的 ASP.NET MVC 问题