473,386 Members | 1,823 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,386 software developers and data experts.

DataGrid Horizontal Scroll Bar problem

I am currently trying to expand upon the default datagrid control using
VB.NET. I have noticed one quirk about it that I cna't seem to get
around. If I have a datagrid that doesn't display all of the columns
(say the grid is only big enough to display 2 and there are 3 columns
total). If you go to the last column (so 3 of 3 in this example) and
scroll either up from the top cell being displayed in the datagrid or
down from the bottom cell being displayed (granted there are more rows
than are currently displayed in the datagrid) you'll see that when to
bring up the next cell from the bottom and we're at the far right
column and part of the 2nd column is displayed to the left it will
force the 2nd column to be fully displayed and the 3rd column which
you're currently editing to be the one that is cut off. I was
wondering if anyone knew which event to override so that I can force
the horizontal scroll bar to keep the same position as I scroll down
the grid rather than jumping back and forth. I hope this is clear
enough, if not let me know.

Nov 21 '05 #1
2 2762

Jan. 10, 2005

I can picture what you mean and I think I have seen that before, but
why can't you just widen the datagrid, because then there won't be a scroll
bar.
Joseph MCAD
"Grant Smith" wrote:
I am currently trying to expand upon the default datagrid control using
VB.NET. I have noticed one quirk about it that I cna't seem to get
around. If I have a datagrid that doesn't display all of the columns
(say the grid is only big enough to display 2 and there are 3 columns
total). If you go to the last column (so 3 of 3 in this example) and
scroll either up from the top cell being displayed in the datagrid or
down from the bottom cell being displayed (granted there are more rows
than are currently displayed in the datagrid) you'll see that when to
bring up the next cell from the bottom and we're at the far right
column and part of the 2nd column is displayed to the left it will
force the 2nd column to be fully displayed and the 3rd column which
you're currently editing to be the one that is cut off. I was
wondering if anyone knew which event to override so that I can force
the horizontal scroll bar to keep the same position as I scroll down
the grid rather than jumping back and forth. I hope this is clear
enough, if not let me know.

Nov 21 '05 #2
I can't make the grid any bigger because of the form size as well as
I'm trying to restrict the form size to less than 800x600.

Nov 21 '05 #3

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

Similar topics

1
by: john sutor | last post by:
Does anyone know if you can display vertical scroll or horizontal scroll bars on the datagrid ???
1
by: RA | last post by:
Hi I wonder if anyone tried this or know if it has been fixed. I am using vs .net 1.1 and have a windows form. In the form I have a DataGrid with the following format: 3 first Columns are of...
0
by: AinO | last post by:
Hi, I implemented a way (googling) to change a row's height in the grid from the code. It works fine, but the datagrid needs to be in read only mode ; for now this is ok. However, to repaint...
3
by: sumit | last post by:
Hi, I made a data grid vertically as well as horizontal scrollable as number of columns are very large!! But when i scroll horizontally then header is not visible as it also gets scrolled...
0
by: dave | last post by:
I have a datagrid within a <div> to allow scolling, but i only need it to allow horizontal scrolling. When the horizontal scroll bar appears it also produces a vertical scroll due to the 9 or so...
1
by: Kevin Hodgson | last post by:
I'm having a strange problem with a VB.NET App, and the built in Windows.Forms.Datagrid I have a tabbed interface, and a DataGrid (along with other controls) on each of my two Tabs. If the...
0
by: Grant Smith | last post by:
I've been creating my own datagrid control which I'm inheiriting from the standard datagrid control and I have come across two very interesting behaviors with the datagrid control. 1. If you...
2
by: Toufik | last post by:
Hi, I've a datagrid bound on a table that exceed the horizontal size. Ive 2 problems: 1- The horizontal scrollbar is hidden sometime. 2- on the scrollbar, I can scroll if I move the bar but if I...
1
by: rizwanm | last post by:
Hi everyone I am using a datagrid in one web form. The problem i am facing is when the data in any of the column increases it increases the height of the grid. I am using a horizontal scroll bar....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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,...

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.