We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to populate the TreeMap data values by using the DataTable?

The following steps help you to populate the TreeMap data values by using the DataTable.

Step 1: Add the data of columns and rows to the DataTable as given in the following code. In the code, five columns are added such as Continent, Country, Growth, Population and StrPopulation and values included for the respective columns.


Step 2: Assign data values to the ItemsSource property in order to populate the provided TreeMap items.


In the following code example, DataTable has been created under the PopulationViewModel() by adding the necessary columns and rows. Column data denotes TreeMap header and row data denotes corresponding values for the TreeMap header. Assign the PopulationDetails data to the ItemsSource of the TreeMap in order to render the TreeMap control.


The following screenshot displays the TreeMap items populated by using the DataTable.

Figure 1: Populating TreeMap items by using DataTable

Sample Link:


Article ID: Published Date: Last Revised Date: Platform: Control:
4244 03/05/2015 03/05/2015 WinForms TreeMap
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon