摘要: 效果图:实现方法:双击GridView的OnRowDataBound事件;在后台的GridView1_RowDataBound()方法添加代码,最后代码如下所示: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //如果是绑定数据行 if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataCo. 阅读全文
posted @ 2013-04-07 12:48 念余温 阅读(339) 评论(0) 推荐(0) 编辑
摘要: GridView和下拉菜单DropDownList结合:效果图:后台代码:using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using Syste 阅读全文
posted @ 2013-04-07 12:03 念余温 阅读(651) 评论(0) 推荐(0) 编辑
摘要: GridView选中,编辑,取消,删除:效果图:后台代码:你可以使用sqlhelper,本文没用。代码如下:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.S 阅读全文
posted @ 2013-04-07 12:01 念余温 阅读(395) 评论(0) 推荐(0) 编辑
摘要: {/// <summary>/// Update 的摘要说明。/// </summary>public class Update : System.Web.UI.Page{protected System.Web.UI.WebControls.DataGrid DG1;protected Classes.AreaInfo myClass=new Client.Classes.AreaInfo();private void Page_Load(object sender, System.EventArgs e){if(!this.IsPostBack){this.DG1. 阅读全文
posted @ 2013-04-07 11:56 念余温 阅读(985) 评论(0) 推荐(0) 编辑