if ((e.Row.RowState & DataControlRowState.Edit) == DataControlRowState.Edit) 转载于:https://www.cnblogs.com/Fernando/archive/2007/12/30/1021288.html