Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Collapse]Grid View
    [Expand]Columns and Card Fields
    [Expand]Rows and Cards
    [Expand]Row, Column and Cell Access API
    [Expand]Split Presentation
    [Expand]Cell Merging
    [Expand]Row Preview Sections
    [Collapse]Scrolling
      View Scrolling
      Tutorial: Row Scrolling
   [Expand]View Technology
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Summaries
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

View Scrolling

This topic describes the following points: controlling end-users' ability to scroll Views, scroling Views via code and ways of responding to user scrolling. Please note that one way to scroll a View is to move the cell focus, however, this topic concerns scrolling techniques that don't involve cell focus changes. For information on moving focus between cells please refer to the Focusing Cells and Moving Row Focus topics.

Expanded Online Video

Learn about the various vertical scrolling modes in a grid View and the API that you can use to scroll the View or respond to end-user scrolling operations.

Expanded Scrolling Grid Views

Unlike Card Views, Grid Views can display both horizontal and vertical scroll bars. There are a number of settings that affect the availability and behavior of these scroll bars to end-users. These settings are listed in the table below.

Member Description
GridView.HorzScrollVisibility Specifies whether the horizontal scroll bar should be always hidden, always visible or displayed when necessary.
GridView.VertScrollVisibility Specifies whether the vertical scroll bar should be always hidden, always visible or displayed when necessary.
GridView.ScrollStyle Provides options specifying when the actual scrolling takes place - as the scroll bar's thumb is moved or when the thumb is released.
GridView.HorzScrollStep Specifies the number of pixels by which the View is scrolled when pressing the horizontal scroll bar's buttons.
GridOptionsBehavior.SmartVertScrollBar Specifies whether the Grid View displays the last row at the top or at the bottom when the vertical scroll bar is in the bottommost position.

To scroll a Grid View via code, use the GridView.TopRowIndex and GridView.LeftCoord properties. The first is used to scroll the View vertically and specifies the visible index of the row displayed at the top of the View. The second enables you to scroll the View horizontally and specifies the scrolling offset in pixels. When these property values change (when the user scrolls the view for instance), the GridView.TopRowChanged and GridView.LeftCoordChanged events are raised respectively. Handle these events to process View scrolling.

The image below illustrates some of these settings.

If you need to scroll a Grid View to ensure that a particular column is visible, pass the column as the GridView.MakeColumnVisible method's parameter. Note: the View is scrolled by the minimum required to display the column's content completely. If you need to scroll the View to a particular row, pass the row handle as the GridView.MakeRowVisible method's parameter. Note: this method makes the row visible even if it was previously hidden within a collapsed group. Again, the View is scrolled by the minimum required.

Expanded See Also

How would you rate this topic?​​​​​​​