日期:2014-05-18 浏览次数:20957 次
void DataGridView_MouseDown(object sender, MouseEventArgs e) { DataGridView.HitTestInfo hittest = this.jcsGridControl1.DataGridView.HitTest(e.X, e.Y); if (hittest.Type == DataGridViewHitTestType.Cell && e.Button == MouseButtons.Right) { MessageBox.Show(hittest.RowIndex.ToString()); } }
------解决方案--------------------
this.datagridview.SelectedRows[0]; //当前选中的行...
------解决方案--------------------
this.datagridview.SelectedRows[0];