本文介绍了如何在asp.net的jquery弹出框中绑定gridview行细节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我想在jquery弹出框中链接gridview行详细信息linkbutton在gridview中单击。 现在,弹出框显示没有绑定数据。我的代码如下。请帮助我。提前谢谢。请快速回答。 < script type = ' 文本/ JavaScript的> $(function(){ var overlay = $('< div id = overlay> < / div > ' ); $(' .close ' )。click(function(){ $(' .popup ' )。hide(); overlay.appendTo(document.body).remove(); 返回false ; }); $(' .x ' ).click(function(){ $(' .popup ' )。hide( ); overlay.appendTo(document.body)。remove(); 返回f ALSE; }); $(' .click ' )。click(function(){ overlay.show(); overlay.appendTo(document.body); $(' .popup ' )。show(); 返回false; }); }); < / script> -------在gridview < asp:TemplateField ItemStyle-BorderColor = #6699ff > < itemtemplate> < asp:LinkButton ID = lbEdit runat = server字体下划线= false OnClick = lbEdit_Click CssClass = 点击>编辑<% - OnClick = lbEdit_Click - %> < span> | < / span > < asp: LinkButton ID = lbDelete runat = server Font-Underline = false>删除 < / itemtemplate > ------------在链接按钮点击事件 受保护的子lbEdit_Click(发件人为对象,e为EventArgs) Dim gvRow As GridViewRow = CType(CType(发送者,控制).Parent.Parent,GridViewRow)尺寸指数为整数= gvRow.RowIndex 尺寸校验值作为字符串 的GetValue = gvFinanceCat.Rows(指数).Cells( 0 )。文本 DT = BusinessLogic.blFinanceTranCategory.FillFinanceCategorybyID(的GetValue) txtCatName.Text = dt.Rows( 0 )。项目( 1 )。ToString() txtDescription.Text = dt.Rows( 0 )。Item( 2 )。ToString() checkvalue = dt.Rows( 0 )。Item( 3 )。ToString()如果checkvalue = 1那么 chkIncome.Checked = True Else chkIncome.Checked = False End if End Sub 解决方案 (function(){ var overlay = ('< div id = overlay> < / div > ' ); (' .close ' )。click(function(){ I want to bind gridview row detail in jquery popup box linkbutton click inside gridview.Now, popup box show without binding data.My code is the following.Please help me.Thanks in advance.Please quickly answer. <script type='text/javascript> $(function () { var overlay = $('<div id="overlay"></div>'); $('.close').click(function () { $('.popup').hide(); overlay.appendTo(document.body).remove(); return false; }); $('.x').click(function () { $('.popup').hide(); overlay.appendTo(document.body).remove(); return false; }); $('.click').click(function () { overlay.show(); overlay.appendTo(document.body); $('.popup').show(); return false; }); }); </script>-------In gridview <asp:TemplateField ItemStyle-BorderColor="#6699ff"> <itemtemplate> <asp:LinkButton ID="lbEdit" runat="server" Font-Underline="false" OnClick="lbEdit_Click" CssClass="click">Edit<%--OnClick="lbEdit_Click" --%> <span>|</span> <asp:LinkButton ID="lbDelete" runat="server" Font-Underline="false">Delete </itemtemplate>------------In linkbutton click event Protected Sub lbEdit_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = CType(CType(sender, Control).Parent.Parent, GridViewRow) Dim index As Integer = gvRow.RowIndex Dim checkvalue As String getvalue = gvFinanceCat.Rows(index).Cells(0).Text dt = BusinessLogic.blFinanceTranCategory.FillFinanceCategorybyID(getvalue) txtCatName.Text = dt.Rows(0).Item(1).ToString() txtDescription.Text = dt.Rows(0).Item(2).ToString() checkvalue = dt.Rows(0).Item(3).ToString() If checkvalue = "1" Then chkIncome.Checked = True Else chkIncome.Checked = False End If End Sub 解决方案 (function () { var overlay =('<div id="overlay"></div>');('.close').click(function () { 这篇关于如何在asp.net的jquery弹出框中绑定gridview行细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-28 00:48