473,796 Members | 2,635 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 4206
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******** ********@TK2MSF TNGP10.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.microso ft.com" <ma******@hotma il.com> a écrit dans le message de
news:u1******** ******@TK2MSFTN GP10.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******** ********@TK2MSF TNGP10.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******** ********@TK2MSF TNGP11.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.microso ft.com" <ma******@hotma il.com> a écrit dans le message de
news:u1******** ******@TK2MSFTN GP10.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******** ********@TK2MSF TNGP10.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******** ********@TK2MSF TNGP11.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.microso ft.com" <ma******@hotma il.com> a écrit dans le message de
news:u1******** ******@TK2MSFTN GP10.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******** ********@TK2MSF TNGP10.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
1258
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 selected item )? Currently as a new item is entered, the grid SCROLLS hence changing the
5
13296
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
1859
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 looking at item number 500 and the item number 100 is selected and an item is added at the top. Then grid doesnt scroll anywhere and item number 500 keeps in view. Is it possible ?
0
1443
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 that of the panel, so the panel scrolls up and down in order to accomodate both of them. The user can drag the Vscrollbar just fine and move about normally. This setup is probably easier to illustrate than describe verbally: ...
5
3291
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
1520
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 quick and easy way to at least get it working for now. I tried to keep this short, but I couldn't find a way to. The control has its Autoscroll property set to true. It contains a PictureBox at 0,0 with its SizeMode set to StretchImage. When...
21
9989
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; cell.RowNumber = dv.Count; m_DataGrid.CurrentCell = cell; } But this the last line of this code is putting the focus on the current
0
2896
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. The imagebox is named panel2 for my own conventions and the panel will be named panel1 Panel2 (the imagebox) is set to fit to the size of Panel1 (the Panel). All of this works great... I have broken up an extremely large image (width wise, not mem...
1
3393
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 can’t find the AutoScroll property. Do I need to set something up for this property? Any help would be appreciated. -- thank You
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10242
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10021
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7558
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4127
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 we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.