By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,061 Members | 1,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,061 IT Pros & Developers. It's quick & easy.

DataGrid Horizontal Scroll Bar problem

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.