473,587 Members | 2,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid VScrollBar Bug?

I have a DataGrid that ends up with a VScrollBar due to the number of
rows, and the behavior I want is for the bottom-most row of the
DataGrid to be shown, i.e., I want the VScrollBar all the way to the
bottom (maximum).

I grab and set the VScrollBar using the following:

if ( historyDataGrid .Controls[1] is VScrollBar )
{
VScrollBar vsb = (VScrollBar)his toryDataGrid.Co ntrols[1];
vsb.Value = vsb.Maximum;
}

This ALMOST works. The VScrollBar moves to the bottom, but the
DataGrid is scrolled only to about 99.5% of maximum. A mouse click to
the sliderbar or the small-increment button causes the DataGrid to be
scrolled all the way to the bottom. I have tried all sorts of stuff -
I'm almost ready to fake a mouse click, but that just seems waaayyyy
too ugly.

Any help greatly appreciated.

Nov 17 '05 #1
0 1266

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

Similar topics

1
1268
by: Durand | last post by:
Hi all, I'm trying to create a vScrollBar with a dynamic value. When I change the maximum value inside a method, it works inside a method, but when I leave this method the maximum value returns to previous value. My vScrollBar is not declared inside any method. Thanks Durand
1
5150
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody play with vScrollBar in C#? I've got a small trouble. When I assign the Maximum value and try to move the slider of the vScrollBar to a maximum position I can't get the maximum value from a vScrollBar.Value. I can assume that to correct this problem is easy. I'm sure that's it's a bug, the developers didn't think about the width of the slider and this width is excluded from the vScrollBar total length, so we're...
2
6593
by: Jack | last post by:
Mi ingles es peor que el de Toro Sentado, espero que en español haya alguien capaz de entenderme y orientarme Trabajo con Visual Studio 2003 y C#, he creado un control derivado de datagrid y he conseguido modificar la apariencia del datagrid, colores de columnas, fuente, estilo de cabeceras de filas y columnas etc... Hasta aqui todo bien, pero soy incapaz de variar el color y estilo de los scrollbars vertical y horizontal, al parecer esto es...
2
1977
by: Hans [DiaGraphIT] | last post by:
Hi! In a windowsapplication i have a datagrid where I dont want the vertical scrollbar to be visible. I can't find HorizontalScrollBar and VerticalScrollBar properties anywhere. I've tried to create controls for this... without luck. Here is the code I'm using. Please tell me what I'm doing wrong. this.InitializeScrollBar(DataGrid1)
7
1451
by: Doug Bell | last post by:
Hi, How can I determine the number of columns in a DataGrid? What I am trying to do is to build a function that will resize the last column to fill the remaining space in the DataGrid. Something like:? Dim intCols As Integer = DataGrid1.DataSource.Columns.Count Dim intUsedWidth as Integer=0
21
9954
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
1
2391
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the System.Windows.Forms.VScrollBar on my form. I'm handling VScrollBar Scroll event. I want to handle the Up, Down, PageUp PageDown keys for this VScrollBar, but when I register to the keyDown and KeyPress events, it never gets there. So I also handled the key events of the form and from there I forwarded the event to the VScrollBar corresponding event, but still the VScrollBar events in never invoked. What should I do so...
0
1092
by: Longkhi | last post by:
Hi everybody. I have quite a problem with the vscrollbar component. The control I'm using has a built-in scrollbar, but I have 5 of those controls, and I would like to bind the external vscrollbar to scroll them all synchronically. I have tried several other methods such as the wndProc override method. It didn't work, so I'm trying this alternative method.
1
1737
by: eBob.com | last post by:
I have two apps, both developed using the same VBE, and both having a VScrollBar, but the two VScrollBars have very different styles. (In the screen shot, which I had hoped to attach but can't, one appears on the left and the other appears on the right. But, even without the screen shot, referring to the two cases as the "left case" and the "right case" seems to make as much sense as any other way of distinguishing the two cases. So...
0
7924
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
7854
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
8219
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...
1
7978
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
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...
0
3845
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
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

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.