WHEN I CLICK ON ANY DATAGRIDVIEW CELL ENTIRE ROW WILL SELECT.

Garry Winogrand

Total Post:24

Points:168
Posted by  Garry Winogrand
C# 
C#
 956  View(s)
Ratings:
Rate this:
Hi Expert,

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

  1. AVADHESH PATEL

    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; 
            }

Answer

NEWSLETTER

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