你得写响应RowEditing事件 的方法,
选择GridView-> 属性-> 事件-> 添加对处理RowEditing的方法
在GridView1的RowEditing事件中,写入跳转代码
int id=Convert.ToInt32(GridView1.Rows[e.NewEditIndex].Cells[主键所在列的索引]);
Response.Redirect("bianji.aspx?rowid="+id);
跳转到编辑页面,并接收参数。
你要让点击按键之后对点击的行进行操作是吧、
就在按键的click事件里这么写
Button thisButton = (Button)sender;
GridViewRow thisRow = (GridViewRow)thisButton.Parent.Parent;
这样就能获得点击行。然后再怎么获得行里的数据就不用我教你了吧。
你的gridview数据源是不是绑定一个sqldatasource?
如果是在sqldatasource中设置点东西,包括一些updata,delete,insert的方法