By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,742 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,742 IT Pros & Developers. It's quick & easy.

Focus on the New Instance of Row in the Grid

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.