Click here to Skip to main content
12,348,995 members (68,367 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2016
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