473,465 Members | 1,366 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1081
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 the datagrid is populated with the specific years...
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 it does not have focus. The code we are using to...
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 it back afterwards.
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 detail form that contains few controls, drop-down,...
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 Grid's DataView finding the first match of 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 focus a cell in this gridview anymore. Does anybody...
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 default property? Can this be done?
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 characters Observed: entered characters are ignored
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.