Focus on the New Instance of Row in the Grid

  • Thread starter Thread starter Mark Vergara
  • Start date Start date
M

Mark Vergara

Hello,

Somebody help on this.
I have my Data Grid, and I want to focus on
the last row of the grid cell let say for example
I have my New button for my Adding a new record

private sub btnNew_Click(Byval sender as object, Byval e as
System.EventArgs)
CurrencyManager.AddNew
mygrid.focus
....... ?
End Sub

then the next code for focusing on the last row of the grid is now my
problem
How can I focus on the new instance of row or focusing on the last row of my
grid ?


Thanks for the help,
Mark
 
Hi,

Dim cm As CurrencyManager

cm = CType(Me.BindingContext(DataGrid1.DataSource), CurrencyManager)

'

Dim dgc As New DataGridCell(cm.Count, 0)

DataGrid1.CurrentCell = dgc


Ken
 
Back
Top