代码如下: 1、RowCommad //获得索引 int index = ((GridViewRow)(((Button)(e.CommandSource)).Parent.Parent)).RowIndex; 2、RowEditing等 //获得索引 int index = e.NewEditIndex; //获取当前GridViewRow对象 GridViewRow editGridViewRow = autoGridView.Rows[girdviewEditIndex]; //获取内容方