Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridView.RefreshScrollAnnotations(ScrollAnnotationKind, Int32[]) Method

Updates scrollbar annotations of the specified kind for the specified rows, and causes them to be redrawn.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public virtual void RefreshScrollAnnotations(
    ScrollAnnotationKind kind,
    int[] rows
)

#Parameters

Name Type Description
kind DevExpress.XtraEditors.Annotations.ScrollAnnotationKind

The kind of scrollbar annotations to update.

rows Int32[]

An array of row handles.

#Remarks

The code below updates custom scrollbar annotations for all rows.

bool ToggleBookmark(int handle) {
    int dataIndex = gridView.GetDataSourceRowIndex(handle);
    if(dataIndex < 0)
        return false;
    if(bookmarks.Contains(dataIndex))
        bookmarks.Remove(dataIndex);
    else
        bookmarks.Add(dataIndex);
    gridView.RefreshScrollAnnotations(ScrollAnnotationKind.Custom);
    gridView.InvalidateRow(handle);
    return true;
}
See Also