- 2 minutes to read
By default, the vertical scrollbar operates in the standard way: it scrolls data rows displayed within the current page. A Virtual paging mode allows end-users to navigate through grid pages using a vertical scroll bar. In this mode, the vertical scroll bar can be used with or without the built-in pager to dynamically load the requested page data via callbacks. If the pager is used, ASPxGridView automatically switches to the required page.
To enable this functionality, set the ASPxGridViewSettings.VerticalScrollBarStyle property to one of the following values.
- VirtualSmooth - When a scroll button is clicked, the ASPxGridView smoothly scrolls data.
- Virtual - When a scroll button is clicked, the ASPxGridView switches to the next/previous page.
When virtual scrolling is turned on and row focusing is enabled (ASPxGridViewBehaviorSettings.AllowFocusedRow is set to true), the first row is always focused between callbacks.
For virtual scrolling to work properly, the following rules should be observed.
- All rows should have the same height.
- It is necessary to adjust the values of the ASPxGridViewPagerSettings.PageSize and ASPxGridSettings.VerticalScrollableHeight properties of your ASPxGridView control so that the total row height fits the page height or exceeds it.
- Width dimension properties (such as a grid's ASPxWebControl.Width, its column WebColumnBase.Width, etc.) should be specified. To learn more, see the ASPxGridView Fixed Table Layout Specifics (Scrolling and Column Resizing) topic.