#region 获取当前选中行
private DataRow GetCurrRow() { CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dataGridView1.DataSource, dataGridView1.DataMember]; if (cm.Position < 0) return null; DataRowView rv = cm.Current as DataRowView; if (rv == null) return null; DataRow row = rv.Row as DataRow; return row; }
#endregion