Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
How can I hide the scrollbar? (or implement freeze pane functionality)
posted

Goal:  Freeze the first few columns and allow horizontal scrolling of the remaining columns.

I read that this functionality is scheduled for a future release but there is no target date.  So, I am hoping to achieve this by using two grids.  But to make it appear as one grid I will need to hide the scrollbars for one of the grids.

Is it possible to hide the vertical and horizontal scrollbars?

Thank you,
Mike

  • 8576
    Offline posted
    Hi Mike -
     
    The only way I can think of to do this is to:
    • use a XamDataPresenter control instead of a XamDataGrid
    • create a new view class that derives from the GridView class
    • override the virtual VerticalScrollBarVisibility property on your derived class to return Visibility.Collapsed 
    • set the XamDataPresenter's View property to an instance of your derived GridView class. 
    If you are not familiar with the XamDataPresenter, it is a control that lets you dynamically switch between different views on your data by setting its View property.  There are 2 views supplied with the product: GridView and CarouselView.  By default the XamDataPresenter uses GridView if no View is explicitly set. 
     
    Note that a XamDataPresenter with its View property set to an instance of a GridView behaves just like a XamDataGrid control and a XamDataPresenter with its View property set to an instance of a CarouselView behaves just like a XamDataCarousel.
     
    Hope this helps.
     
    Joe