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
  [Expand]Tree List
  [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
  [Collapse]TreeMap Control
   [Expand]Getting Started
   [Collapse]Providing Data
    [Collapse]Examples
      How to: Manually Add Items to a TreeMap
      How to: Provide Flat Data to a TreeMap
      How to: Provide Hierarchical Data to a Tree Map
   [Expand]Layout Algorithms
   [Expand]Colorizers
   [Expand]End-User Interaction
   [Expand]Visual Elements
 [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

How to: Manually Add Items to a TreeMap

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T360867.

To manually provide data for a TreeMap, assign a newly created instance of the TreeMapItemStorage class to the TreeMapControl.DataAdapter property. Then, create several objects of the TreeMapItem class or its descendant class, specify their TreeMapItem.Label and TreeMapItem.Value properties, and add them to the TreeMapItemStorage.Items collection.

Note – to create a group, you will need to add a new TreeMapItem and fill its TreeMapItem.Children collection with tree map items.

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