[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Collapse]Appearances and Look And Feel
     [Expand]Alpha Blending
       Conditional Formatting
       Customizing the Appearance of Individual Cells
       Customizing the Appearance of TreeList Elements
       Customizing the Appearances of Columns
     [Expand]Custom Drawing
      Skins and LookAndFeel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Customizing the Appearance of Individual Cells

The appearance of individual cells can be customized using one of the following approaches.

  • Conditional Formatting - This feature allows you to change the appearance of individual cells or rows based on specific conditions.
  • Customizing the appearance of cells dynamically, by handling the dedicated TreeList.NodeCellStyle event. This event fires for each cell before it is painted.
  • Custom painting cells with the TreeList.CustomDrawNodeCell event. Note that an appearance provided via a custom draw event is only applied to a control on the form. It is not applied when the control is printed or exported. For more information on implementing custom painting, see the Custom Drawing topic.

Expanded Example - Customize Cell Appearance via the NodeCellStyle event

The following sample code handles the TreeList.NodeCellStyle event to modify the appearance of the "Budget" column's cells whose values are greater than 500,000.

Expanded Example - Customize Cell Appearance via Custom Painting

The following sample code handles the TreeList.CustomDrawNodeCell event. It is used to perform custom painting of node cells. All node cells are painted in the same manner.

The image below illustrates the result of executing the sample code.

Is this topic helpful?​​​​​​​