GridView.RefreshScrollAnnotations(ScrollAnnotationKind) Method
In This Article
Updates scrollbar annotations of the specified kind, 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 = ScrollAnnotationKind.All
)
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
kind | DevExpress. |
All | A kind of scrollbar annotations to update. |
#Remarks
Note
Show Me Run the Scrollbar Annotations & Bookmarks module in the Xtra
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