windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-682158e6.md
Occurs when a worksheet is being scrolled in the SpreadsheetControl‘s UI.
Namespace : DevExpress.XtraSpreadsheet
Assembly : DevExpress.XtraSpreadsheet.v25.2.dll
NuGet Package : DevExpress.Win.Spreadsheet
public event ScrollPositionChangedEventHandler ScrollPositionChanged
Public Event ScrollPositionChanged As ScrollPositionChangedEventHandler
The ScrollPositionChanged event's data class is ScrollPositionChangedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| ColumnIndex | Gets the index of the left-most column of the currently visible area. |
| RowIndex | Gets the index of the top row of the currently visible area. |
The ScrollPositionChanged event occurs in the following cases:
Note
By default, the ScrollPositionChanged event does not occur when scrolling a worksheet in code. However, this event will also be triggered by changes made via an API if you set the WorkbookEventOptions.RaiseOnModificationsViaAPI property (accessible via the SpreadsheetControl.Options.Events.RaiseOnModificationsViaAPI notation) to true. In this case, when the Worksheet.ScrollTo, Worksheet.ScrollToColumn or Worksheet.ScrollToRow method is used to scroll a worksheet, or the Worksheet.FreezePanes, Worksheet.FreezeColumns, Worksheet.FreezeRows or Worksheet.UnfreezePanes method is called to create or remove frozen panes, the ScrollPositionChanged event fires.
See Also