如何在点击gridview行的asp.net中显示弹出页面 [英] how do I show pop up page in asp.net on click of row of gridview
本文介绍了如何在点击gridview行的asp.net中显示弹出页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个用于触摸屏的asp.net网站,当用户点击网格视图的一行时,弹出页面必须出现要求用户身份验证,并且必须禁用网格页面。 。
我正在寻找启用此功能的代码..任何人都可以帮助我吗?
aspx页
< table >
< tr >
< td >
< asp:GridView ID = GridViewResourceGroup runat = server CssClass = gridTable EmptyDataText = 找不到记录 宽度 = 100% AutoGenerateColumns = false onrowdatabound = < span class =code-keyword> GridViewResourceGroup_RowDataBound >
< asp:BoundField DataField = 代码 HeaderText = 代码 / >
< asp:BoundField DataField = < span class =code-keyword>工作区 HeaderText = 工作场所 / >
< asp:BoundField DataField = 描述 HeaderText = 描述 < span class =code-attribute> / >
< / td >
< / tr >
< / table >
aspx。 cs页
受保护 void GridViewResourceGroup_RowDataBound( object sender,GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( onmouseover , this.style.backgroundColor ='#6699FF');
e.Row.Attributes.Add( onmouseout, this.style.backgroundColor ='#F9F7F7');
}
}
解决方案
请尝试谷歌并开始使用。如果您将停在某处,我们一定会帮助您。
另请尝试以下链接:
在ASP.Net中单击GridView行时打开弹出窗口 [ ^ ]
点击gridview linkbutton点击事件打开弹出窗口 [ ^ ]
在gridview行中点击任意位置时打开弹出窗口而不在代码隐藏中回发 [ ^ ]
在gridview链接按钮上打开ajax modelpopup [ ^ ]
打开应用程序页面(.aspx)页面作为弹出窗口时单击GridView上的链接按钮? [ ^ ]
你可以参考这个链接。
http://www.aspsnippets.com/Articles/Add-Edit-Update-Records-in-GridView-using -Modal-Popup-in-ASP.Net.aspx [ ^ ]
此示例符合您的要求
I am creating a asp.net website to be used on touch screen where when a user clicks on a row of a grid view, pop up page must appear to ask for user authentication and the page of grid must be disable...
I am looking for a code to enable this .. can anyone help me??
aspx page
<table>
<tr>
<td>
<asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable" EmptyDataText="No Record Found" Width="100%" AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound">
<asp:BoundField DataField="Code" HeaderText="Code" />
<asp:BoundField DataField="Workplace" HeaderText="Workplace" />
<asp:BoundField DataField="Description" HeaderText="Description" />
</td>
</tr>
</table>
aspx.cs page
protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'");
}
}
解决方案
Please try to google and get started. If you will be stop some where then we will definitely help you.
Also try the following links:
Open Popup window when GridView row is clicked in ASP.Net[^]
open popup on click of gridview linkbutton click event[^]
how to open a popup when click anywhere in gridview row without postback in codebehind[^]
open a ajax modelpopup on gridview link button[^]
Open application page (.aspx) page as a popup when click link button on GridView?[^]
You may refer this link.
http://www.aspsnippets.com/Articles/Add-Edit-Update-Records-in-GridView-using-Modal-Popup-in-ASP.Net.aspx[^]
This example matches with your requirement.
这篇关于如何在点击gridview行的asp.net中显示弹出页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文