Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 11-Aug-10 2:14am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

USe
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

DataGridView1.CurrentCell = DataGridView1.Rows[index].Cells[2];
DataGridView1.BeginEdit(true);
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 328
1 Gihan Liyanage 292
2 Sergey Alexandrovich Kryukov 275
3 ClimerChinna 222
4 Abhinav S 187
0 Sergey Alexandrovich Kryukov 8,213
1 OriginalGriff 7,089
2 CPallini 2,598
3 Richard MacCutchan 1,925
4 Abhinav S 1,778


Advertise | Privacy | Mobile
Web04 | 2.8.140826.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100