ComponentOne FlexPivot for WinForms
C1.Win.C1FlexGrid.4.8 Assembly / C1.Win.C1FlexGrid Namespace / C1FlexGridBase Class / AfterScroll Event
Example

In This Topic
    AfterScroll Event (C1FlexGridBase)
    In This Topic
    Fires after the grid scrolls.
    Syntax
    'Declaration
     
    Public Event AfterScroll As RangeEventHandler
    public event RangeEventHandler AfterScroll
    Event Data

    The event handler receives an argument of type RangeEventArgs containing data related to this event. The following RangeEventArgs properties provide information specific to this event.

    PropertyDescription
    Gets or sets a value indicating whether the new selection should be canceled.  
    Gets the range that will be selected after the event.  
    Gets the range selected before the event.  
    Remarks
    This event allows you to prevent the user from scrolling the grid while an operation is being performed on the current selection.
    Example
    The code below prevents the grid from scrolling while the grid is in edit mode.
    void _flex_BeforeScroll(object sender, RangeEventArgs e)
    {
        if (_flex.Editor != null)
            e.Cancel = true;
    }
    See Also