473,503 Members | 10,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid AutoScroll

Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls showing
the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see
them.
Thanks for your suggestions.

Stan
Nov 20 '05 #1
4 4175
Can you try using the Select Method to select the last added row ? that way
you would automatically have the last 10 rows displayed
HTH
Manasvin
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls showing the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see
them.
Thanks for your suggestions.

Stan

Nov 20 '05 #2
Hi Mansvin,
I don't want to select the 10 last added rows and display them.
In fact, I have a winform that contains a datagrid and some textboxes that
allow the users to add datas to the datagrid.
My datagrid displays 10 rows and when the user adds more than 10 rows he can
not see the last row he added because
the scrollbar doesn't automatically move and he has to move manually the
scrollbar to see the last row he adds.

So, how can I avoid this ?

Stan

"msnews.microsoft.com" <ma******@hotmail.com> a écrit dans le message de
news:u1**************@TK2MSFTNGP10.phx.gbl...
Can you try using the Select Method to select the last added row ? that way you would automatically have the last 10 rows displayed
HTH
Manasvin
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls

showing
the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see them.
Thanks for your suggestions.

Stan


Nov 20 '05 #3
The Select allows u to select a paraticular row. If you select the last row
you added after the add button event, the grid should automatically scroll
to focus on the new selected record

HTH

Manasvin

"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Mansvin,
I don't want to select the 10 last added rows and display them.
In fact, I have a winform that contains a datagrid and some textboxes that
allow the users to add datas to the datagrid.
My datagrid displays 10 rows and when the user adds more than 10 rows he can not see the last row he added because
the scrollbar doesn't automatically move and he has to move manually the
scrollbar to see the last row he adds.

So, how can I avoid this ?

Stan

"msnews.microsoft.com" <ma******@hotmail.com> a écrit dans le message de
news:u1**************@TK2MSFTNGP10.phx.gbl...
Can you try using the Select Method to select the last added row ? that

way
you would automatically have the last 10 rows displayed
HTH
Manasvin
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls

showing
the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see them.
Thanks for your suggestions.

Stan



Nov 20 '05 #4
you could also try setting the currentcell property to a cell on the new row

Manasvin

"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Mansvin,
I don't want to select the 10 last added rows and display them.
In fact, I have a winform that contains a datagrid and some textboxes that
allow the users to add datas to the datagrid.
My datagrid displays 10 rows and when the user adds more than 10 rows he can not see the last row he added because
the scrollbar doesn't automatically move and he has to move manually the
scrollbar to see the last row he adds.

So, how can I avoid this ?

Stan

"msnews.microsoft.com" <ma******@hotmail.com> a écrit dans le message de
news:u1**************@TK2MSFTNGP10.phx.gbl...
Can you try using the Select Method to select the last added row ? that

way
you would automatically have the last 10 rows displayed
HTH
Manasvin
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
First, happy new year 2004 :-)

I have a datagrid that displays 10 rows.
I would like when I add new rows the datagrid automatically scrolls

showing
the 10 last rows.
Currently, the new rows are added but I have to use the scroll bar to see them.
Thanks for your suggestions.

Stan



Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1232
by: rawCoder | last post by:
Hi All, This is a repost of 'Disable DataGrid AutoScroll of 3/7/2005' Its related to "WinForm DataGrid" HOW can i force the grid NOT to Auto Scroll to the ( newly added item OR last...
5
13283
by: MrNobody | last post by:
I want to know how to scroll a DataGrid so that a specific row index will be visible to the user?
0
1825
by: rawCoder | last post by:
If an item is added in a grid, then the grid scrolls automatically either to bring the selected or the last entered item in focus. Is there a way to disable this scrolling. Means, If I am...
0
1432
by: 23s | last post by:
I have 2 rich textboxes within an auto-scrolling panel object. The textboxes aren't wider than the panel, so it never scrolls horizontally. But the combined height of both textboxes is taller than...
5
3273
by: Frank | last post by:
Hello, if autoscroll is true in a form. Is there a way to detect the scrollbars are active? Thanks Frank
0
1507
by: Jeff | last post by:
I am making a custom control that displays images, allows zooming in and out, and can fit the image to the control. The way I am handling all of this is probably not best, but I was looking for a...
21
9934
by: Sharon | last post by:
I have added an auto scroll feature to my DataGrid control like this: private void DoAutoScroll() { DataView dv = m_DataGrid.DataSource as DataView; DataGridCell cell = m_DataGrid.CurrentCell;...
0
2874
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities....
1
3380
by: =?Utf-8?B?R3VzIENodWNo?= | last post by:
I’m working on a GroupBox and need to set the AutoScroll property to true. My problem is I have no AutoScroll property listed in the property box. And even if I go in to the Designer.cs file I...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
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,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
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
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
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 ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.