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
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.