需要重新再Grid_rowEditi
1
2
3
4
5
6
7
8
9
10
11
12 |
public
void GridView1_RowEditing( object
sender, GridViewEditEventArgs e) { DataTable dt = new
DataTable(); DataColumn dcName = dt.Columns.Add( "Intro" ); dcName.DataType = Type.GetType( "System.String" ); DataRow dr = dt.NewRow(); dr[0] = "test" ; dt.Rows.Add(dr); GridView1.DataSource = dt; GridView1.EditIndex = e.NewEditIndex; GridView1.DataBind(); } |
ng()事件中重新绑定datasource;和写入index
Gridview点击两次才进入编辑模式,布布扣,bubuko.com
原文:http://www.cnblogs.com/jingcxin/p/3672523.html