New to Telerik UI for WinForms? Download free 30-day trial

Data Binding

Data binding is a mechanism for automatic population of the RadTreeMap with items, based on the provided data structure. Three properties control the data binding:

  • DataSource - specifies the data structure to be bound.

  • DisplayMember - specifies the particular field in the data source which will be used from the items in RadTreeMap for their Text.

  • ValueMember - specifies the particular field in the data source which controls the value for each item.

RadTreeMap supports data binding either at design time or at run time. Both of the approaches will lead to the same result:

WinForms RadTreeMap Data Binding

Run Time


this.radTreeMap1.DisplayMember = "ProductName";
this.radTreeMap1.ValueMember = "ProductID";
this.radTreeMap1.DataSource = this.productsBindingSource;


Me.radTreeMap1.DisplayMember = "ProductName"
Me.radTreeMap1.ValueMember = "ProductID"
Me.radTreeMap1.DataSource = Me.productsBindingSource

Design Time

It is possible to specify the DataSource, DisplayMember, ValueMember properties via the Smart Tag. The following tutorial demonstrates how to bind the tree map control to the Northwind.Products table:

WinForms RadTreeMap Design Time Step 1

WinForms RadTreeMap Design Time Step 2

WinForms RadTreeMap Design Time Step 3

WinForms RadTreeMap Design Time Step 4

WinForms RadTreeMap Design Time Step 5

WinForms RadTreeMap Design Time Step 6

WinForms RadTreeMap Design Time Step 7

WinForms RadTreeMap Design Time Step 8

WinForms RadTreeMap Design Time Step 9

WinForms RadTreeMap Design Time Step 10

See Also

In this article