TreeList.InvalidateColumnHeader(TreeListColumn) Method
Invalidates the header of the specified column.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v24.1.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
Declaration
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).