TreeMapFlatDataAdapter.LabelDataMember Property

Gets or sets the name of the data field whose values are used to automatically generate TreeMapItem.Label values.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v20.1.dll

Declaration

[DefaultValue("")]
[XtraSerializableProperty]
public string LabelDataMember { get; set; }
<DefaultValue("")>
<XtraSerializableProperty>
Public Property LabelDataMember As String

Property Value

Type Default Description
String

String.Empty

A String value.

Examples

To provide flat data to a TreeMap, create a TreeMapFlatDataAdapter object and assign it to the TreeMapControl.DataAdapter property. Then, specify the adapter's TreeMapFlatDataAdapter.DataSource, TreeMapFlatDataAdapter.LabelDataMember and TreeMapFlatDataAdapter.ValueDataMember to configure the data source object and which data members should be used to generate tree map items. If you need to group generated items, add the name of a data member whose values should be used to group items, to the TreeMapFlatDataAdapter.GroupDataMembers collection.

void ConfigureTreeMapDataAdapter() {
    TreeMapFlatDataAdapter adapter = new TreeMapFlatDataAdapter {
        DataSource = CreateBillionaireInfos(),
        LabelDataMember = "Name",
        ValueDataMember = "NetWorth"
    };
    adapter.GroupDataMembers.Add("Residence");
    treeMap.DataAdapter = adapter;
}

Implements

DevExpress.TreeMap.Native.IFlatDataAdapter.LabelDataMember
See Also