473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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)historyDataGrid.Controls[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 1246

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

Similar topics

1
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...
1
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...
2
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...
2
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...
7
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....
21
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;...
1
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...
0
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...
1
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
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
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,...
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...

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.