Reputation: 8636
Actually i will have a form open when i click on a row of datagridview . When i make necessary changes and click on save i would like the select that particular row as selected which i previously i selected as well as i had to make one of the tree node to be get selected too..
If i click on the 2nd row i will have a form open if i click on save i would like to select that row again
Upvotes: 0
Views: 1484
Reputation: 8636
Got the answer
int currRow = 0; currRow = dataGridView1.CurrentRow.Index;
dataGridView1.ClearSelection();
dataGridView1.Rows[currRow].Selected = true;
Upvotes: 1