无法使用LinkBut​​ton的OnClick属性在jQuery PopUp中显示GridView [英] Unable to display GridView in jQuery PopUp using OnClick attribute of LinkButton

查看:67
本文介绍了无法使用LinkBut​​ton的OnClick属性在jQuery PopUp中显示GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的WebForm上有GridView:GridView3,这个GridView的DataSource是QueueManagerNT。

我在Code Behind中添加了一个EventHandler,lbInsert_Click。这将是DataBind GridView7:

I have on GridView on my WebForm: GridView3, DataSource for this GridView is QueueManagerNT.
I have added an EventHandler, lbInsert_Click in the Code Behind. This will DataBind GridView7:

Protected Sub lbInsert_Click(ByVal sender As Object, ByVal e As EventArgs)
    ManagerBreakup.SelectParameters("Business_Unit_Location").DefaultValue = "H, I"
    ManagerBreakup.SelectParameters("Employee_Queue_Name").DefaultValue = "ALL"
    ManagerBreakup.SelectParameters("Manager_NT").DefaultValue = "S_Y"
    GridView7.DataBind()
End Sub



我添加了一个LinkBut​​ton列,如下所示:


I have added a LinkButton Column as shown below:

<asp:TemplateField>
  <ItemTemplate>
    <asp:LinkButton ID="lnkView" runat="server" OnClick="lbInsert_Click">View</asp:LinkButton>
  </ItemTemplate>
</asp:TemplateField>



我使用jQuery弹出窗口显示GridView7:


I am using a jQuery popup to display GridView7:

<script type="text/javascript">
    $("[id*=lnkView]").live("click", function () {
        $("#GridView7").dialog({
            title: "Manager Details",
            width: "200px",
            buttons: {
                Close: function () {
                    $(this).dialog('close');
                }
            }
        });
        return false;
    });
</script>



如果我首先使用LinkBut​​ton的点击事件数据绑定GridView7,那么我就能够使用GridView获取弹出窗口,但如果我使用lnkView的OnClick =lbInsert_Click属性,则不会出现弹出窗口。


If I am databinding GridView7 first using a LinkButton’s Click Event then I am able to get the popup window with the GridView but the popup window will not appear if I am using OnClick="lbInsert_Click" attribute of "lnkView".

推荐答案

[id * = lnkView])。live( 点击 function (){
("[id*=lnkView]").live("click", function () {


#GridView7)。dialog({
title: 经理详细信息
宽度: 2 00px
按钮:{
关闭:功能(){
("#GridView7").dialog({ title: "Manager Details", width: "200px", buttons: { Close: function () {


)。对话框(' close' );
}
}
});
return false ;
});
< / script >
(this).dialog('close'); } } }); return false; }); </script>



如果我首先使用LinkBut​​ton的点击事件数据绑定GridView7,那么我就能够使用GridView获取弹出窗口,但如果我使用lnkView的OnClick =lbInsert_Click属性,弹出窗口将不会出现。


If I am databinding GridView7 first using a LinkButton’s Click Event then I am able to get the popup window with the GridView but the popup window will not appear if I am using OnClick="lbInsert_Click" attribute of "lnkView".


这篇关于无法使用LinkBut​​ton的OnClick属性在jQuery PopUp中显示GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆