TreeList.InvalidateNodes() Method
Invalidates all visible nodes and row footers.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v20.2.dll
NuGet Package: DevExpress.Win.TreeList
Declaration
Remarks
Use the InvalidateNodes method to force repainting of all nodes and row footers currently visible within the TreeList control. Note that nodes include cells, preview sections, node images, expand/collapse buttons and indicator cell buttons. Row footers include indicator cells as well.
Calling the InvalidateNodes method is useful if you want to repaint the mentioned elements at times when not repainted automatically. For instance, navigating through cells doesn’t invoke row footer repainting. Thus, you must invoke row footer repainting manually if you want their look & feel to depend on specific conditions.
Generally, the following must be done in order to use the InvalidateNodes method effectively.
- Write either a TreeList.CustomDrawNodeButton, TreeList.CustomDrawNodeCell, TreeList.CustomDrawNodeImages, TreeList.CustomDrawNodeIndicator, TreeList.CustomDrawNodePreview, TreeList.CustomDrawRowFooter or TreeList.CustomDrawRowFooterCell event handler. This enables you to custom paint elements affected by the InvalidateNodes method.
- Call the InvalidateNodes method when changes requiring to repaint these elements have been performed (if these elements are not repainted automatically).
The TreeList.InvalidateNode method enables you to repaint a single node.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InvalidateNodes() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.