Hello.
I'm developing a C# application with a DataGridView using Visual Studio Community 2015, .NET Framework 4.6.00081 on a Dell laptop.
When a user clicks a cell in a DataGridView, I would like my program to select the whole row of where the cell was clicked. I tried this:
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
dataGridView1.Rows[e.RowIndex].Selected = true;
}and it works fine if the user only selects one cell. It does not work if the user selects consecutive/concurrent cells in different rows.
Does anybody know how I can select the complete row/rows of whatever cells a user clicks?
Any help would be gratefully appreciated.
Thanks,
Tony
Stop The World, I want To Get Off! ........... Life Isn't About Waiting For The Storm To Pass ... It's About Learning To Dance In The Rain.