[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 With Data Grid and Views
   [Expand]Data Binding
    Unbound Columns
   [Expand]Views
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Filter and Search
   [Expand]Summaries
   [Expand]Focus and Selection Handling
    Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Collapse]Scrolling
     Infinite Scrolling
     Scrollbar Annotations
   [Expand]Batch Modifications
    Hit Information
    Hints
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property 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]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Scrollbar Annotations

When grids contain many rows, locating those with validation errors, and those that are focused or selected, can be difficult. To help locate these rows expeditiously, display scrollbar annotations. The latter are colored marks on the vertical scrollbar that reflect the location of corresponding rows in the grid.

Expanded How to Enable

The GridView.OptionsScrollAnnotations property provides access to options that allow you to enable/disable specific annotations.

  • ShowErrors — specifies whether to mark rows with validation errors
  • ShowFocusedRow — specifies whether to mark the focused row
  • ShowSelectedRows — specifies whether to mark selected rows
  • ShowCustomAnnotations — specifies whether to mark rows with custom annotations provided using a dedicated event (see below)

Scrollbar annotations are disabled if the corresponding property is set to Default. You should explicitly set the options to True to enable the required scrollbar annotations.

Scrollbar annotations have the following limitations:

Expanded Custom Annotations

The GridView.CustomScrollAnnotation event allows you to provide data about the required custom annotations. Data is represented by the GridScrollAnnotationInfo type, which exposes the following properties.

  • RowHandle — handle of the required row (see Row handles in the Rows topic)
  • Color — color of the mark on the scrollbar

When handling this event, create data objects and add them to the Annotations collection in the event arguments.

The SetAnnotations method allows you to set annotations for a row array. Note that this method does not add annotations, but resets them.

Expanded How to: Create Row Bookmarks Using Scrollbar Annotations and Row Indicators

Note

Demo Run the Scrollbar Annotations & Bookmarks module in the XtraGrid demo to see the functionality in action.

You can provide users with the ability to bookmark specific rows and navigate between them using the keyboard. To implement this functionality, handle the following events:

Is this topic helpful?​​​​​​​