Version

Configuring Data Binding and Visualization (xamMultiColumnComboEditor)

Topic Overview

Purpose

This topic explains how to bind the xamMultiColumnComboEditor™ control to data and configure the items layout in the control’s drop-down list.

Required background

The following topic is a prerequisite to understanding this topic:

Topic Purpose

This topic describes how to add a xamMultiColumnComboEditor control to an application and use some of its properties.

Data Binding and Visualization Configuration Summary

Data binding and visualization configuration summary chart

The following table briefly explains the configurable aspects of the xamMultiColumnComboEditor control and maps them to the properties that configure them. Further details are available after the table.

Configurable aspect Details Properties

To populate the xamMultiColumnComboEditor with data, set its ItemsSource property to a data source.

Use any IEnumerable collection of data objects.

To enable/disable the automatic generation of columns, use the xamMultiColumnComboEditor AutoGenerateColumns property.

To display only specific columns in the xamMultiColumnComboEditor drop-down-list, use the Columns collection property.

Binding to Data Source

Overview

To populate the xamMultiColumnComboEditor control with data, set its ItemsSource property to a data source. Use any IEnumerable collection of data objects.

Note
Note

The xamMultiColumnComboEditor does not support adding items directly, so you must have an IEnumerable data source to bind it to.

Note
Note

By design, the xamMultiColumnComboEditor control can’t be bound to a collection of primitive types.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Set the xamMultiColumnComboEditor Data Source

IEnumerable

Example

The screenshot below demonstrates how the xamMultiColumnComboEditor looks as a result of the following settings:

Property Value

{Binding Path=Products}

False

ProductName

Configuring Data Population and Visualization 1.png

Following is the code that implements this example.

In XAML:

<ig:XamMultiColumnComboEditor x:Name="ComboEditorProducts"
                              Height="30" Width="300"
                              ItemsSource="{Binding Path=Products}"
                              AutoGenerateColumns="False"
                              DisplayMemberPath="ProductName">
    <ig:XamMultiColumnComboEditor.Columns>
        <ig:TextComboColumn Key="ProductName"/>
        <ig:TextComboColumn Key="ProductID"/>
        <ig:TextComboColumn Key="UnitsInStock"/>
    </ig:XamMultiColumnComboEditor.Columns>
</ig:XamMultiColumnComboEditor>

Configuring Columns Auto Generation

Overview

Enable/disable the xamMultiColumnComboEditor columns auto generation using the AutoGenerateColumns property.

By default, the columns automatic generation is enabled. Columns are generated for every public property of the data object contained in the source IEnumerable.

If the AutoGenerateColumns property is set to False, specify the required visible columns using the Columns collection property.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Configure the columns auto generation

bool

Configuring Visible Columns

Overview

Specify the visible columns in the xamMultiColumnComboEditor drop-down list using the Columns property.

Use the following available column types:

Note
Note

You can load an Image either by binding the Key to a property containing the Uri or by binding to a property of type BitmapImage.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Specify a collection of visible columns

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic describes how to configure the executed action when the user types and after that hits 'Enter' key in the input text field in the xamMultiColumnComboEditor control.

This topic explains how to configure the layout and behavior of the xamMultiColumnComboEditor Drop-Down.

This topic describes how to configure items filtering in the xamMultiColumnComboEditor control.

The topics in this group explain selection feature in the xamMultiColumnComboEditor control and its use.