All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
关于URL传递日文字符乱码问题的解决方案_.net资料_编程技术
XML学习笔记(五)Schema语法之简单类型_[XML教程]
用php读取xml数据_[PHP教程]
SQL存储过程入门级教程_[SQL Server教程]
PHP,stripos(),函数_php资料_编程技术
解决方案:用户sa登录失败_[SQL,Server教程]
ASP.NET实例:在GridView使用HyperLinkField,属性的链接_[Asp.Net教程]
Asp.net程序中生成Excel报表_[Asp.Net教程]
ASP.NET,2.0打造购物车和支付系统之二_.net资料_编程技术
让ASP.NET简便使用SCRIPT_[Asp.Net教程]
Reading number is top 10 pictures
9.3阅兵全景图8-航空梯队
NeedWallpaper10
Take you to walk into the most true north Korea rural4
八个盛产美女的国家2
Japan sexy beauty passion photo
The money of more than 100 countries and regions11
大四女生借债隆胸成功
Extremely rare TianShan Mountains snow lotus2
The money of more than 100 countries and regions14
这才是真正的人体艺术1
Download software ranking
Tram sex maniac 2 (H) rar bag14
Tram sex maniac 2 (H) rar bag18
Take off clothes to survival
jdk1.6 for windows
天龙八部十二宫服务端
Unix video tutorial7
Boxer's Top ten classic battle9
Kung.Fu.Panda.2
jdk1.5
Tram sex maniac 2 (H) rar bag16
归海一刀 published in(发表于) 2014/1/30 1:31:56 Edit(编辑)
单击GridView某行获取该行某列内容并显示_[Asp.Net教程]

单击GridView某行获取该行某列内容并显示_[Asp.Net教程]

单击GridView某行获取该行某列内容并显示_[Asp.Net教程]

方法1:单击GridView某行获取该行某列并显示在一个TextBox中


C# code //GV行添加JS事件

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "gvselchange('" + e.Row.Cells[0].Text + "')");
}


}


JScript code

function gvselchange(o1)
{
document.getElementById("<%=TextBox1.ClientID %>").value=o1;
}



方法2:
执行的是单击某一行根据这一行内容弹出一个窗体

C# code


protected void gvData_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onclick"] = String.Format("window.parent.document.frames(’right’).location = ’../Report/Test.aspx?id={0}’", e.Row.Cells[1].Text);
}
}


来源:csdn


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.