473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2784

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
4989
by: john sutor | last post by:
Does anyone know if you can display vertical scroll or horizontal scroll bars on the datagrid ???
1
1730
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 type text box and 5 last columns are of type checkbox(bool) I added some rows info. When the RowHeadersVisible = false here is the problem I see: When launching the application make sure to size down the window so that the
0
896
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 the client area i need to toggle the ReadOnly flag ; ReadOnly = false; ....
3
3299
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 up,,so to tackle this i made a different data grid having only header as the row and the other datagrid contains the actual data for it,, Due to this vertical scrolling problem goes as i have put
0
1061
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 pixels eaten up by the horizontal scroll. I have set Overflow-Y:clip and Overflow-X:auto This get me closer to what i need, but it still isnt allowing for the 9pxs eaten by the horizontal scroll bar.
1
2272
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 Datagrid on my first Tab has a horizontal scrollbar automatically drawn because the table is too wide, and I switch to the other tab and resize the form, when I switch back to the first tab, the horizontal scrollbar on the datagrid is in the same...
0
1061
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 are currently editing a cell and use the scroll wheel to scroll up or down and the editing cell is no longer being shown on the grid then the grid loses focus and goes to the next control. Is there some way to have the datagrid to remain focused...
2
1301
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 click on the right button (of the scroll bar) it doesn't scroll. Any Idea about this problem. thanks
1
1153
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. So i can afford width increase. The main problem ibecause of height increase is that the scroll bar which i am using is placed in the <div> tag. Thus if the height of the column increases it leads to the increase in height of the entire grid making...
0
9498
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
10373
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
9969
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
7519
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
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
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
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
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.