通过模板字段打开NavigateUrl窗口

时间:2013-03-25 10:18:21

标签: javascript jquery asp.net ajax telerik

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


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