Posted 8 September 2017, 1:29 pm EST
I have sited the Spread Control (v3.0.2009.2005) in a form. The viewport size is changeable by the user at runtime. I have added a method that allows the user to bind a DataTable as the DataSource of the control. The DataTable contains hierarchical data that is typically three levels deep. There is often only one row in the topmost sheet, but numerous rows in each of the child and grandchild sheets. I have turned off vertical scrollbars in the child sheets, as users have found them confusing and distracting. I want users to be able to scroll the display using only the scrollbar for the topmost sheet, so I have set the VerticalScrollBarPolicy for the topmost sheet to "AsNeeded" and the VerticalScrollBarPolicy for all child sheets to "Never".
If the hierarchical view is collapsed, there is no scrollbar. If I expand the sheets until there are enough rows to exceed the display area of the control, the vertical scrollbar will appear, but I cannot use it to scroll the remaining child rows into view. If I add a second row to the topmost sheet, then the scrollbar will scroll the view until the second row in the topmost sheet is at the top of the viewing area, but not so far as to allow users to see all of the second row's child sheet rows, and so on. I would like to use code to move the view of the rows in such a way as to allow clicks or drags on the vertical scrollbar to move the child sheet rows into view. How can I use code to force the control to allow users to scroll the child rows into view using just the scollbar for the topmost sheet?