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 278
1 Nguyen.H.H.Dang 230
2 Maciej Los 205
3 Peter Leow 195
4 arvind mepani 187


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