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.InvalidateColumnHeader(TreeListColumn) Method

Invalidates the header of the specified column.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public virtual void InvalidateColumnHeader(
    TreeListColumn column
)

#Parameters

Name Type Description
column TreeListColumn

A TreeListColumn object specifying the column whose header is to be invalidated.

#Remarks

Use the InvalidateColumnHeader method to force the TreeList control to repaint the desired column header. This is useful when you want column headers to change their appearance at times when not repainted automatically. For instance, navigating through cells or changing a cell value doesn’t invoke column header repainting. Thus, you must force repainting manually if you want a column header’s appearance to depend upon cell values or the currently focused cell.

Generally, you need to do the following in order to use the InvalidateColumnHeader method effectively:

  • Write a TreeList.CustomDrawColumnHeader event handler. This enables you to provide different look & feel for column headers due to custom conditions.
  • Call the InvalidateColumnHeader method when the mentioned conditions change (if these changes don’t invoke column header repainting automatically).
See Also