2013-03-16 67 views

回答

1

也许这DataGridViewCell.RowIndex Property

private void getCurrentCellButton_Click(object sender, System.EventArgs e) 
{ 
    string msg = String.Format("Row: {0}, Column: {1}", 
    dataGridView1.CurrentCell.RowIndex, 
    dataGridView1.CurrentCell.ColumnIndex); 
    MessageBox.Show(msg, "Current Cell"); 
} 
相关问题