Back to Devexpress

GridView.InvalidateScrollAnnotations() Method

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-560bf11d.md

latest1.9 KB
Original Source

GridView.InvalidateScrollAnnotations() Method

Invalidates scrollbar annotations, and causes them to be redrawn.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public virtual void InvalidateScrollAnnotations()
vb
Public Overridable Sub InvalidateScrollAnnotations

Remarks

The code below invalidates scrollbar annotations when a style changes.

csharp
void OnAnnotationsStyleChanged(object sender, ListChangedEventArgs e) {
    if(e.ListChangedType == ListChangedType.ItemChanged) 
        gridView.InvalidateScrollAnnotations();
}
vb
Private Sub OnAnnotationsStyleChanged(ByVal sender As Object, ByVal e As ListChangedEventArgs) Handles stylesSource.ListChanged
    If e.ListChangedType = ListChangedType.ItemChanged Then
        gridView.InvalidateScrollAnnotations()
    End If
End Sub

Note

Run the Scrollbar Annotations & Bookmarks module in the XtraGrid MainDemo to see the complete example.

See Also

RefreshScrollAnnotations

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace