Horizontal and Vertical Scrolling
- 2 minutes to read
The Pivot Grid control includes built-in support for horizontal and vertical scroll bars. It removes the need to use the browser’s scroll bar, which is not convenient, because column and row areas scroll out of view.
The vertical scroll bar is an alternative to the pager. The pivot grid scroll bar is useful when you need to see as much of the data as possible without having to browse multiple pages.
Horizontal and Vertical Scroll Bars
To control the visibility of the ASPxPivotGrid horizontal and vertical scroll bars, use the PivotGridWebOptionsView.HorizontalScrollBarMode and PivotGridWebOptionsView.VerticalScrollBarMode properties. You can access the PivotGridWebOptionsView object using the ASPxPivotGrid.OptionsView property.
To enable scrolling, set the PivotGridWebOptionsView.HorizontalScrollBarMode and PivotGridWebOptionsView.VerticalScrollBarMode properties to Visible or Auto. In the Visible mode, the scroll bar is always visible. In the Auto mode, the scroll bar is automatically shown when the width/height of the ASPxPivotGrid control content is more then the control width/height. In the Hidden mode, scroll bars will not be displayed.
Note
Set the control width/height to use the horizontal/vertical scroll bar. If the ASPxPivotGrid.Width/ASPxWebControl.Height is set to 0 when the scroll bar is enabled, the scroll bar will be shown in disabled mode.
Scrolling mode
The ASPxPivotGrid control supports two scrolling modes: Standard and Virtual. The default is Standard. This mode allows end-users to scroll data columns/rows displayed within the current page. For a vertical scroll bar, if the pager is disabled, end-users can scroll the entire control content. In the Virtual scrolling mode, the scrollbar is used to dynamically load the requested page data using callbacks. To learn more, refer to Virtual Scrolling topic.
To specify the horizontal and vertical scrolling mode, use the PivotGridWebOptionsView.HorizontalScrollingMode and PivotGridWebOptionsView.VerticalScrollingMode properties, respectively.