sisibest

导航

2012年12月17日

GridView中DropDownList联动

摘要: GridView中DropDownList联动2010-07-30 00:26 by Jun2009, 228 阅读, 0 评论, 收藏, 编辑1.在GridView模板列中添加DropDownList并设置AutoPostback属性为true。2.再在DropDownList的SelectedIndexChanged事件里写下面几句话。DropDownList ddl = (DropDownList)sender;//得到当前的DropDownListGridViewRow gvr = (GridViewRow)ddl.NamingContainer;//获取对DropDownList的容 阅读全文

posted @ 2012-12-17 15:54 sisibest 阅读(146) 评论(0) 推荐(0)

转载--从XML文件中读取数据绑定到DropDownList

摘要: 1、绑定DropDownList: ddl_language.DataSource = createDataSource();ddl_language.DataTextField = "languageTextField";ddl_language.DataValueField = "languageValueField";ddl_language.DataBind();2、上面用到的createDataSource()方法: private ICollection createDataSource() { //create a data table t 阅读全文

posted @ 2012-12-17 15:50 sisibest 阅读(161) 评论(0) 推荐(0)

c#.net语句e.Row.RowType == DataControlRowType.DataRow是什么含义?

摘要: c#.net语句e.Row.RowType == DataControlRowType.DataRow是什么含义?事件语句 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[3].Text = Convert.ToDateTime(e.Row.Cells[3].Text).ToShortDateString(); } } 中 e.Row.RowType 是什么意思 阅读全文

posted @ 2012-12-17 11:02 sisibest 阅读(1446) 评论(0) 推荐(0)