在Form的InitializeComponent中写上:
this.dataGrid1.CurrentCellChanged += new System.EventHandler(this.dataGrid1_CurrentCellChanged);然后写这样一个处理函数就可以了:
private void dataGrid1_CurrentCellChanged(Object sender,System.EventArgs e)
{
MessageBox.Show("Col:" + dataGrid1.CurrentCell.ColumnNumber
+",Row:" + dataGrid1.CurrentCell.RowNumber
+",Value:" +dataGrid1[dataGrid1.CurrentCell].ToString());
}