Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Nodes
    [Expand]Data Editing
    [Collapse]Data Representation
      Columns
      Fixed Columns
      Preview Sections
      Bands
    [Expand]Sorting
    [Expand]Filtering
    [Expand]Summaries
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
    [Expand]Miscellaneous
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Columns

The Tree List control displays data by means of nodes and columns. If the control is bound to a data source, columns represent fields while nodes correspond to records.

Expanded Column Objects

The Tree List control stores columns in the TreeList.Columns collection. Each column, represented by a TreeListColumn class object, provides properties to specify the column's visibility, display caption, width, in-place editor, appearance and formatting settings, etc. However, the column's main property is TreeListColumn.FieldName. In bound mode, it specifies the data source field whose data is displayed in the current column.

You can access columns via the indexer provided by the TreeList.Columns collection. The indexer accepts either the index of the column or the name of the bound field. TreeListColumn objects are components. So, if columns are created at design time, you can access them by names in code, like other components.

The focused column can be accessed via the TreeList.FocusedColumn property. Together with the focused node (TreeList.FocusedNode), the focused column identifies the currently focused cell. If you want to move focus to another column, assign this column to the TreeList.FocusedColumn property.

Expanded Column Layout

The position of columns within the TreeList.Columns collection does not specify their visible order. The visual position of a column is specified via its TreeListColumn.VisibleIndex property. Set this property to -1, to hide the column. Setting it to a non-negative integer makes it visible again.

End-users have the ability to customize the layout of columns at runtime (rearrange, hide and restore columns). To rearrange columns, they can use drag-and-drop. To hide certain columns, they need to invoke the Customization Form and drag columns by their header from the Tree List control onto the Customization Form.

To access and restore hidden columns, end-users need to again display the Customization Form, and drag columns back from the form to the Tree List control. Note that moving columns to/from the Customization Form modifies the TreeListColumn.VisibleIndex property.

By default, columns are proportionally resized to fit the Tree List control's width in its entirety. You can disable this feature via the TreeListOptionsView.AutoWidth property. In this instance, columns will have the exact width specified by the TreeListColumn.Width property.

Expanded Column Behavior

You can disable and enable various behavior options for columns via the TreeListColumn.OptionsColumn property. This property provides access to the following settings:

Expanded Appearance Options

A column's appearance can be modified by:

Expanded See Also

How would you rate this topic?​​​​​​​