Edit this page

Populating With Data RadPivotMap

RadPivotMap expects data in tabular format and displays a treemap with grouped data, according to the GroupDefinition-s set.

Assuming that you have the following class:

public class TestData
{
     public int Value { get; set; }
     public string Category { get; set; }
     public string Subcategory { get; set; }
}
Private _category As String
    Public Property Category() As String
        Get
            Return _Category
        End Get
        Set(ByVal value As String)
            _Category = value
        End Set
    End Property
Private _Value As Integer
    Public Property Value() As Integer
        Get
            Return _Value
        End Get
        Set(ByVal value As Integer)
            _Value = value
        End Set
    End Property
Private _Subcategory As String
    Public Property Subcategory() As String
        Get
            Return _subcategory
        End Get
        Set(ByVal value As String)
            _Subcategory = value
        End Set
    End Property

To bind the RadPivotMap you should use the GroupDefinition collection and add several GroupDefinitions - one for each of the properties as presented in the class. The ValuePath property specifies from where the data should be taken.

<telerik:RadPivotMap Name="treeMap1" ValuePath="Value">
    <telerik:RadPivotMap.GroupDefinitions>
                    <telerik:GroupDefinition Member="Category" />
                    <telerik:GroupDefinition Member="SubCategory" />
    </telerik:RadPivotMap.GroupDefinitions>
</telerik:RadPivotMap>

You can bind the RadPivotMap to any source that implements one of the following interfaces:
Was this article helpful? Yes No

Give article feedback

Tell us how we can improve this article

Dummy