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

TreeList.RefreshScrollAnnotations(ScrollAnnotationKind) Method

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

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public virtual void RefreshScrollAnnotations(
    ScrollAnnotationKind kind = ScrollAnnotationKind.All
)

#Optional Parameters

Name Type Default Description
kind DevExpress.XtraEditors.Annotations.ScrollAnnotationKind All

The kind of scrollbar annotations to update.

#Remarks

The code below updates custom scrollbar annotations for all nodes.

bool ToggleBookmark(TreeListNode node) {
    int dataIndex = node != null ? node.Id : -1;
    if(dataIndex < 0)
        return false;
    if(bookmarks.Contains(dataIndex))
        bookmarks.Remove(dataIndex);
    else
        bookmarks.Add(dataIndex);
    treeList1.RefreshScrollAnnotations(ScrollAnnotationKind.Custom);
    treeList1.InvalidateNode(node);
    return true;
}

Note

Run the Hierarchy Column module in the XtraTreeList MainDemo to see the complete example.

See Also