You will need to look at the RowIndex
property for the CurrentCell
property for the DataGridView. some thing like
void RenameToolStripMenuItemClick(object sender, EventArgs e)
{ //this should rename the table
MessageBox.Show("This should rename the selected row number " + dataGridView1.CurrentCell.RowIndex);
}
BUT please remember RowIndex count is starting at 0.
So, row one will show row number 0 and row two will show row number 1.
To work around the RowIndex confusion, you could just add a 1 to the rowIndex like below
void RenameToolStripMenuItemClick(object sender, EventArgs e)
{ //this should rename the table
MessageBox.Show("This should rename the selected row number " + (dataGridView1.CurrentCell.RowIndex + 1));
}