beforeDeleteDataRow事件
If e.DataRow.RowState <> DataRowState.Added Then msgbox("不能删除") e.cancel = TrueEnd If