472,328 Members | 1,224 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

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 1039
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bryan Masephol | last post by:
Hi All I got a datagrid and a ComboBox on a form. I populate the combobox with years for all the data avaiable. When the user chooses a year...
2
by: Mystery Man | last post by:
We have an MDI application that is not setting always setting focus to the newly corrected MDI. It is creating the form and it is the topmost but...
0
by: Newbie | last post by:
I have several grid objects on my dialog. How can I change the focus so it is on grid #1. For instance, if a user changes the foucs, I want to set...
10
by: lux | last post by:
Hi, How can I capture the EVT_SET_FOCUS on a wxGrid? Tank's in advance Luca
1
by: Wan | last post by:
Hi, I have a small test project consists of two simple forms. The main form contains a datagrid and upon doubleclick event of grid I bring up a...
0
by: Doug Bell | last post by:
Hi, I have a problem with a Custom DataGrid on some PCs. I have a TextBox that the User can type into and as they type it searches through the...
4
by: foolmelon | last post by:
Before AJAX, we were able to focus a cell in a gridview during a fullpage postback. After putting the gridview inside an UpdatePanel, we cannot...
10
by: Derek Hart | last post by:
I can set focus to my property grid by using propgrid.Focus - but how can I set the default property that is always first? Or just set focus to the...
5
by: Andrus | last post by:
Steps to reproduce issue: 1. Run code. 2. Enter some data to grid 3. Click other form caption 4. Click original form caption 5. Enter some...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.