在GridView自定义执行控件操作的时候,获取操作行索引的方法如下
int index = ((GridViewRow)(((Button)(e.CommandSource)).Parent.Parent)).RowIndex;
如果用GridView自带按钮执行操作时
int i = Convert.ToInt32(e.CommandArgument);
转载于:https://www.cnblogs.com/Impulse/archive/2008/04/09/1144855.html