Home > DeveloperSection > Forums > When i click on any datagridview cell entire row will select.
Garry Winogrand
Garry Winogrand

Total Post:24

Points:168
Posted on    June-15-2013 1:03 AM

 C# C# 
Ratings:


 1 Reply(s)
 770  View(s)
Rate this:
Hi Expert,

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



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-15-2013 4:13 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick