RowEditing中的 e.RowIndex

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();

啊随碟附送

 

================

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值