When i click on any datagridview cell entire row will select.

Total Post:24

Points:168
C# 
C#
 1200  View(s)
Ratings:
Rate this:
Hi Expert,

 When i click on any datagridview cell entire row will select.

  1. Post:604

    Points:4228
    Re: When i click on any datagridview cell entire row will select.

    Hi Garry,


    In datagridview_CellClick event write this code dataGridView1.Rows[e.RowIndex].Selected = true; 

    exmaple: -

    private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
            {
                dataGridView1.Rows[e.RowIndex].Selected = true; 
            }

      Modified On Mar-30-2018 03:49:13 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!