Advertise with us

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

Hi Expert,

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

Last updated:6/15/2013 4:13:19 AM

1 Answers

AVADHESH PATEL
AVADHESH PATEL

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