Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PickerColumn.ItemsSource Property

Gets or sets the collection of values displayed in the drop-down list. This is a bindable property.

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

#Declaration

C#
public object ItemsSource { get; set; }

#Property Value

Type Description
System.Object

The collection of values displayed in the drop-down list.

#Remarks

The ItemsSource collection contains values that users can select in the drop-down list. If this collection contains business objects, use the following properties to describe the business object’s data fields:

  • DisplayMember — specifies the data field that contains values that are displayed in the drop-down list.
  • ValueMember — specifies the data field that contains values that are actually assigned to cells.

#Examples

The example below uses the ComboBoxColumn to display available values in the drop-down list when a user types in a cell.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:dxg="clr-namespace:DevExpress.Maui.DataGrid;assembly=DevExpress.Maui.DataGrid"
             xmlns:scg="clr-namespace:System.Collections.Generic;assembly=netstandard">
    <dxg:DataGridView ItemsSource="{Binding Path=Employees}"
                      EditorShowMode="Tap">
        <dxg:DataGridView.Columns>
            <!-- Other columns here. -->
            <dxg:ComboBoxColumn FieldName="JobTitle" 
                                EditorFilterComparisonType="CurrentCultureIgnoreCase"
                                EditorFilterCondition="StartsWith"
                                IsEditorFilterEnabled="True">
                <dxg:ComboBoxColumn.ItemsSource>
                    <scg:List x:TypeArguments="x:String">
                        <x:String>Chief Executive Officer</x:String>
                        <x:String>Chief Technology Officer</x:String>
                        <x:String>Network Administrator</x:String>
                    </scg:List>
                </dxg:ComboBoxColumn.ItemsSource>
            </dxg:ComboBoxColumn>
            <!-- Other columns here. -->
        </dxg:DataGridView.Columns>
    </dxg:DataGridView>
</ContentPage>

In the example below, the ComboBoxColumn is bound to a data field that contains integer values. To display strings instead of integers in the drop-down list, the example uses a business object that combines strings with integers. The DisplayMember and ValueMember properties specify data fields that contain displayed strings and actual integer values.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:dxg="clr-namespace:DevExpress.Maui.DataGrid;assembly=DevExpress.Maui.DataGrid">
    <dxg:DataGridView x:Name="dataGridView"
                    ItemsSource="{Binding Path=Employees}"
                    EditorShowMode="Tap">
        <dxg:DataGridView.Columns>
            <!-- Other columns here. -->
            <dxg:ComboBoxColumn FieldName="Job" 
                                ItemsSource="{Binding Jobs}"
                                DisplayMember="Title"
                                ValueMember="Id"
                                IsEditorFilterEnabled="True">
            </dxg:ComboBoxColumn>
            <!-- Other columns here. -->
        </dxg:DataGridView.Columns>
    </dxg:DataGridView>
</ContentPage>
See Also