469,917 Members | 1,834 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Focus on the New Instance of Row in the Grid

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
Nov 20 '05 #1
1 945
Hi,

Dim cm As CurrencyManager

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

'

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

DataGrid1.CurrentCell = dgc
Ken
---------------------
"Mark Vergara" <ma************@hotmail.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bryan Masephol | last post: by
2 posts views Thread by Mystery Man | last post: by
reply views Thread by Newbie | last post: by
10 posts views Thread by lux | last post: by
1 post views Thread by Wan | last post: by
reply views Thread by Doug Bell | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.