Advanced TreeView Control

Advanced TreeView control included with DotNetBar for Windows Forms is designed from ground up to replace standard TreeView control and provide additional advanced functionality like multi-selection, multi-column and styling support. Out of box it provides great looking Office 2007 style and per-node customization for background color, text-color etc.

In heart of Advanced TreeView control is the tree Node. Each node in Advanced TreeView consist of one or more cells. Each cell can render any combination of Image, Text and Check-Box/Radio Button. You can also host any Windows Forms control in cells. Cell text supports our high-speed text-markup that allows extensive text formatting using html like markup.

Image below shows following Advanced TreeView control features:

  • Node styling and optional node style spanning control width to create headers
  • Check-box with 3-state support per node cell
  • Option button support
  • Each node cell can contain any combination of image, text and check-boxes
  • Node cell parts orientation can be either horizontal or vertical
Advanced TreeView Control in Office 2007 style

Advanced Features


  • Automatic Drag & Drop support (including multi-node drag & drop) with informational events fired during drag & drop operation for complete control.
  • Fantastic Drag & Drop Visual Feedback. Advanced TreeView provides excellent visual feedback while nodes are dragged including dragged node ghost image. Here is a screen-shot that illustrates that:

    Advanced TreeView Control Drag & Drop Support
  • Multiple node selection support through MultiSelect property. You can also change multi-selection rule (MultiSelectRule property), to specify that only nodes belonging to same parent can be selected (default) or all nodes. Using events you can also programmatically control the node selection.
  • 3 Selected Node Styles. Highlight cells style, full row select style and node marker.
  • Control over node connector style. Change line type, color or thickness or hide connector completely.
  • 4 Expand buttons styles including Windows Vista like style and custom expand button images.
  • Node Expand button visibility control. You have complete control over expand button visibility.
  • Node hot-tracking support. Highlight the mouse over node when enabled using HotTracking property.
  • Disable whole node using Enabled property or just specific cells. If you have image assigned to a cell, we automatically create disabled variant or you can assign your own.
  • Image in column header. Assign image to each column header through Image property.
  • Check-box state represented by image. Replace default check-box, option box representation with custom images.
  • Horizontal and Vertical grid lines. Complete control over display of horizontal and vertical grid lines.

Multi-column support


Advanced TreeView control supports multiple columns with fixed and relative column width. Using relative column width you can ensure that all columns fit the control width and are also automatically adjusted if control width changes. Column width can be changed by end-user, but that functionality can be disabled if desired.

Image below shows an example of how multiple column support can be used to create advanced looking data presentations.

Advanced TreeView Control Multiple Column support

Additionally separate columns (with column header visible or not) can be defined for child nodes. For example you can easily create trees like this one:

Advanced TreeView Control with Multiple Column support for child nodes
 

Data-Binding support

Advanced TreeView control includes support for data-binding to standard VS.NET data sources including arrays. The control will automatically create intelligent human readable column headers based on your column names. For example, FIRST_NAME filed name will receive column header 'First Name' or LastName field will receive column header 'Last Name'. You can also explicitly define columns, their headers and widths. Image below shows data-binding in action:

Advanced TreeView Data-Binding support

Data-Binding support in Advanced TreeView will change the appearance of the control so it looks like a grid when no grouping is specified. Control can automatically create hierarchical presentation of your flat data if you specify the field or property names grouping should be based on. This is done by simply setting GroupingMembers property with comma separated list of the field names you want control to group data by. It will automatically do all the work for you.

While GroupingMembers property is used to group data by value in tree, as alternative you can set ParentFieldNames property to the id and parent id that you want to use to create your tree. For example if your table represents departments, you would have DepartmentId field which uniquely identifies a department, and ParentDepartmentId field which identifies parent department if any. In such setup you would set ParentFieldNames property to DepartmentId,ParentDepartmentId to create tree from flat table or list data source.

Check out TreeControl sample included with the DotNetBar for an demo of control's features.

ListView style Tile view

Tree control can represent data in ListView style Tile view as well. Switching the active view is done by simply changing View property. Here is screen-shot from sample included:

ListView style tile view layout for tree control

Tile view is very powerful when combined with data-binding and auto-grouping support that tree control includes. Following screen-shot, also from the sample application included with the control, shows data-binding in tile view:

ListView style tile view layout for tree control with data-binding and grouping

 

Download fully functional trial of DotNetBar Suite for Windows Forms now and experience how easy it is to create professional looking applications.


  • $264 per developer or less!
  • 100% royalty-free
  • 12 months of all and any updates
  • E-Mail Support for 12 months

  • Fully functional 28-day trial.

DotNetBar readers choice award
DotNetBar is winner of Visual Studio Magazine Readers’ Choice Award as the Best User Interface Component for Windows Forms among more than 30 UI components. Thank you for voting and choosing DotNetBar.