Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
In my datagridview i have 4 rows all row r editable .after select the last row in the datagrid then i am sort the datagrid then select the next row .but the focus was go to the 1 cell of that row not the selected one .any one help me
Posted

USe
SQL
Datagridview1.Rows(0).Cells(0).Selected = True
Datagridview1.Select()



This will select the First Row's First Cell. Use the Row and Cell No. According to your requirement.
 
Share this answer
 
DataGridView1.CurrentCell = DataGridView1.Rows[index].Cells[2];
DataGridView1.BeginEdit(true);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900