Invalidates the specified node.
NuGet Package: DevExpress.Win.TreeList
public virtual void InvalidateNode( TreeListNode node )
Public Overridable Sub InvalidateNode( node As TreeListNode )
A TreeListNode object specifying the node to be invalidated.
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.