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

Reading number is top 10 articles
利用AJAX与数据岛实现无刷新绑定_[AJAX教程]
浅谈PHP开发中MySQL数据库索引的经验_php资料_编程技术
HTML网页制作基础教程(1):认识HTML_[Html教程]
asp.net生成验证码(vb.net)_[Asp.Net教程]
AJAX实例:根据邮编自动完成地址信息_[AJAX教程]
PHP初学:实例详细学习PHP的简单语法_php资料_编程技术
浅谈.NET中的数据绑定表达式_[Asp.Net教程]
使用SQL存储过程有什么好处_[SQL,Server教程]
判断远程图片是否存在_[XML教程]
查询中where和having的区别_[SQL Server教程]
Reading number is top 10 pictures
Female model behind the bitterness, often being overcharged4
Breasts woman big set 2
BingBingFan apple dew point photo gallery2
采访谢楠
30 beautiful school beauty5
水晶头骨造型的酒瓶
From China fortress sora aoi4
贩卖儿童者必须判死刑
刘亦菲写真集1
The real super beauty13
Download software ranking
Unix video tutorial17
Wild things 2
实战黑客不求人
Sora aoi, the maid, students' uniforms
网络管理员第三版
网络管理员第三版
Boxer's Top ten classic battle4
卡丁车单机版
linux高级编程
Boxer's Top ten classic battle8
delv published in(发表于) 2014/1/24 9:08:28 Edit(编辑)
ASP.NE技巧:GridView绑定DropdownList_[Asp.Net教程]

ASP.NE技巧:GridView绑定DropdownList_[Asp.Net教程]

ASP.NE技巧:GridView绑定DropdownList_[Asp.Net教程]

绑定下拉菜单,显示的时候是一个label,在点编辑的时候才显示出下拉菜单来


html代码部分:










CS代码部分



protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DropDownList goodsType = (DropDownList)e.Row.FindControl("DropDownList1");
if (goodsType != null)
{
con = new SqlConnection(ConfigurationManager.ConnectionStrings["TestProviderConnectionString"].ConnectionString);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select * from goodsType",con);
da.Fill(ds,"gt");
goodsType.DataSource = ds.Tables["gt"];
goodsType.DataTextField = "goodsType";
goodsType.DataValueField = "goodsId";
goodsType.DataBind();
}
}







添加到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.