Vertical scrollbar not functional when child rows are expanded

Posted by: slehman-fp on 8 September 2017, 1:29 pm EST

  • 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?


     

  • Replied 8 September 2017, 1:29 pm EST

    Yes, it helps.  I think for now that will have to be the workaround.
  • Replied 8 September 2017, 1:29 pm EST

    Bob, when you say there is not a way to do this in the "current version", do you
    mean v3.0.2009.2005, or version 4+ (or both)?
  • Replied 8 September 2017, 1:29 pm EST

    There is not a way to do this in the current version.  Each parent and subsequent children are there own spreadviews and hence have their own scrollbars, as you have mentioned.  The parent scroll bars can only navigate up to certain point.  I will add this as an enhancement for a later release.
  • Replied 8 September 2017, 1:29 pm EST

    Both.  Just out of curiosity does it help if you resize the spread to accommodate all the children?
  • Replied 8 September 2017, 1:29 pm EST

    Iam facing the same issue above. Has this been fixed in any later releases ?


    Harish

  • Replied 8 September 2017, 1:29 pm EST

    Thanks Bob. It is working now.Smile


    But it is not showing some rows of the child fully?


     


    Thanks,


    Asha

  • Replied 8 September 2017, 1:29 pm EST

    Could you please tell how have you set the vertical scrollbar for the childsheet to never


     


    Thanks,


    Asha

  • Replied 8 September 2017, 1:29 pm EST

    You can use the ChildWorkBookCreated event and set the scrollbar policy to never.
  • Replied 8 September 2017, 1:29 pm EST

    Hi,


    could you please tell how to set the scrollbarpolicy for parent and child sheet view.


     


    Thanks,


    Asha

  • Replied 8 September 2017, 1:29 pm EST

    You would have to resize the spread to show all the rows if you don't want the scrollbars.
  • Replied 8 September 2017, 1:29 pm EST

    FpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never

    Private Sub FpSpread1_ChildWorkbookCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildWorkbookCreatedEventArgs) Handles FpSpread1.ChildWorkbookCreated
    e.Workbook.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never

    End Sub

  • Replied 8 September 2017, 1:29 pm EST

    Hello Harish,

    This has already been reported as a bug Bug #:

    27231
    . I will update you as soon as I get any information about this whether it can be fixed or not.

     

    Thanks,

     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels