protected void gv_RowEditing(object sender, GridViewEditEventArgs e)
{
gv.EditIndex =e.NewEditIndex;
GridViewRow gvr = gv.Rows[e.NewEditIndex];
//gvr.Cells[1].Text
BindDaa();
}
protected void gv_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
gv.EditIndex = e.RowIndex;
int id = int.Parse(gv.DataKeys[e.RowIndex].Value.ToString());
string str= ((TextBox)gv.Rows[e.RowIndex].FindControl("txt")).Text.Trim();
}
详见
GridView1.EditIndex = e.NewEditIndex;
//string planname=new DataKey()
Session.RemoveAll();
Session["plannem"] = null;
string strplanname = ((Label)GridView1.Rows[e.NewEditIndex].FindControl("PLANNAME")).Text.ToString().Trim();
Session["plannem"] = strplanname;
Response.Redirect("ListUser.aspx");
DataBind();
http://forums.asp.net/t/1377386.aspx/1/10
详见
/protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
Session.RemoveAll();
Session["oldInfoType_Name"] = null;
Session["string oldInfoType"] = null;
//GridView1.EditIndex = e.NewEditIndex;
string oldInfoType_Name =((Label)GridView1.Rows[e.NewEditIndex].FindControl("Label1")).Text;
string oldInfoType = ((Label)GridView1.Rows[e.NewEditIndex].FindControl("Label2")).Text;
Session["oldInfoType_Name"] = oldInfoType_Name;Session["string oldInfoType"] = oldInfoType;
GridView1.DataBind();
http://forums.asp.net/t/1377386.aspx/1/10
详见
GridView1.EditIndex = e.NewEditIndex;
//string planname=new DataKey()
Session.RemoveAll();
Session["plannem"] = null;
string strplanname = ((Label)GridView1.Rows[e.NewEditIndex].FindControl("PLANNAME")).Text.ToString().Trim();
Session["plannem"] = strplanname;
Response.Redirect("ListUser.aspx");
DataBind();
啊随碟附送
================