1
Answer

How to select a row in DataGridView control on right click of mouse


I want to select a row of datagridview when user will right click on a particular cell.
How I can do that?

I tried the code..
 private void grid_users_MouseClick(object sender, MouseEventArgs e)
        {
            if(e.Button == MouseButtons.Right)
            {
                  //the control goes here..but i am not getting how I can select a row
             } }

or shall I go for another event?
Answers (1)