Message 1 of 3
Problem with AutoScroll

Not applicable
12-31-2008
12:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a form that I have constructed and placed into a Palette window. This form starts out as a "UserControl". Inside of that is a TableLayoutPanel. Inside of that is a FlowLayoutPanel. Inside of that are 6 DataGridViews. The FlowLayoutPanel has AutoScroll turned on. Each datagrid also has AutoScroll turned on (both directions). The intent is that I can show or hide the data grid views depending on the data rows that I want to show. When I show a list that is longer than the palette window, the autoscroll bars turn on as expected.
Now the problem: When I scroll down on the list of a long DataGridView using the scroll bar from the FlowLayoutPanel, the rows display. When I click on one of the lower rows, the scrollbar for the FlowLayoutPanel scrolls back to the top. This problem effectively selects ALL the rows from the one i click on back up to the last one visible from a top most scroll.
Example: There are 21 rows in existance. 18 are visible. I scroll down to see row 21, then I select it. From a single distinct click, i get rows 21 through 18 all selected, and the scroll bar is back on top.
The vertical scrollbars for the data grid views never came on, because they are docked to the Flow Layout Panel who is docked to the TableLayoutPanel who is docked to the UserControl. All the controls are set to AutoSize True (grow and shrink).
How do i get this automatic scrolling to the top issue to stop?
Thanks,
jvj
Now the problem: When I scroll down on the list of a long DataGridView using the scroll bar from the FlowLayoutPanel, the rows display. When I click on one of the lower rows, the scrollbar for the FlowLayoutPanel scrolls back to the top. This problem effectively selects ALL the rows from the one i click on back up to the last one visible from a top most scroll.
Example: There are 21 rows in existance. 18 are visible. I scroll down to see row 21, then I select it. From a single distinct click, i get rows 21 through 18 all selected, and the scroll bar is back on top.
The vertical scrollbars for the data grid views never came on, because they are docked to the Flow Layout Panel who is docked to the TableLayoutPanel who is docked to the UserControl. All the controls are set to AutoSize True (grow and shrink).
How do i get this automatic scrolling to the top issue to stop?
Thanks,
jvj