TreeList.InvalidateNode(TreeListNode) Method
Invalidates the specified node.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v20.1.dll
NuGet Package: DevExpress.Win.TreeList
Declaration
Parameters
Name | Type | Description |
---|---|---|
node | TreeListNode | A TreeListNode object specifying the node to be invalidated. |
Remarks
Use the InvalidateNode method to force the TreeList control to repaint the desired node. This is useful when you want a node to change its look & feel when it is not repainted automatically. For instance, a node’s indicator cell is not repainted when navigating through cells. Thus, you must force node repainting manually if you want to update the node as a result of such changes.
Remember that nodes include cells, preview section, node images, expand/collapse buttons and the node indicator cell.
Basically, you need to do the following to use the InvalidateNode method effectively.
- Write either a TreeList.CustomDrawNodeCell, TreeList.CustomDrawNodeButton, TreeList.CustomDrawNodeImages, TreeList.CustomDrawNodeIndicator or TreeList.CustomDrawNodePreview event handler. This enables you to repaint a node section with respect to certain custom conditions.
- Call the InvalidateNode method if the above mentioned conditions have been changed (if node repainting is not performed automatically).
The TreeList.InvalidateNodes method enables you to repaint all currently visible nodes.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the InvalidateNode(TreeListNode) 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.