Home All Groups Group Topic Archive Search About

DataGridView Vertical Scrolling Problem

Author
27 Jan 2006 10:48 PM
Roger
I have a simple datagridView control on a Win form.
The GridView is in unbound mode and is used for display only so all the
'AllowUser' properties are set to false. It is also read only.

When the form is FIRST shown , if the number of rows exceeds the physical
height,the GridView control starts with correctly with vertical scroll bars.
The only problem is that the scroll parameters are not correct in that if
the rows to be shown are 30 and the physical size allows 18 I only get
scrolling to 22.
Now this only happens when the GridView is first shown.

If the user clicks to  new data (a new order, or a new date) everything
works fine.
If the user returns to the first invoice/order everythings fine.
When I check the DataGridView RowsCount property before the GridView control
is first made visible I get 30 for the RowCount.
So its not the DataGridView.Rows.Add method thats causing the problem.

It seems to be when the control starts with vertical scrolling then the
scrolling parameters are not properly set?????
Anyone else experiencing this problem?
VS2005 & VB

--
Roger

AddThis Social Bookmark Button