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
      TreeView Style
    [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]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Preview Sections

Expanded Preview Sections

The Tree List provides a preview feature which allows each node to display a preview section. Preview sections are appropriate for displaying memo fields or custom data for a given record. They are displayed across all the Tree List's columns, occupying a node's entire width. Preview sections are read-only, and cannot be modified by end-users.

The image below shows a Tree List displaying preview sections.

To display preview sections, do the following:

The height of preview sections (in lines) is specified by the TreeList.PreviewLineCount property. In the following image, this property is set to 2.

The height of preview sections can be calculated automatically according to their contents. To do this, set the TreeListOptionsView.AutoCalcPreviewLineCount property to true (see the first image).

Expanded Custom Preview

The Tree List allows custom text to be displayed within preview sections. To do this, handle the TreeList.GetPreviewText event. The event GetPreviewTextEventArgs.PreviewText parameter allows you to assign custom text for individual preview sections.

To provide text for preview sections when the Tree List control is printed, use the TreeList.GetPrintPreviewText event.

The preview section can also be custom painted by handling the TreeList.CustomDrawNodePreview event. It fires before preview sections are painted. For more information on custom painting, see Custom Drawing.

Expanded Example

The sample code below handles the TreeList.GetPreviewText event. This is used to display values of the Location and Phone fields within preview sections of nodes.

The image illustrates the result of sample code execution.

Expanded See Also

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