Problem with DataGridComboBoxColumn.ItemsSource

Topics: Bug Report Forum, Developer Forum, User Forum
Sep 18, 2009 at 4:06 PM

Hi,

I am having an issue with the data grid when I bind to a combo box.  I am unable to bind to a collection with DataGridComboBoxColumn.

 

Hi,

I am having an issue with the data grid when I bind to a combo box.  I am unable to bind to a collection with DataGridComboBoxColumn. Below is the
xaml for the combo box.
   <dg:DataGridComboBoxColumn x:Name="_column4" MinWidth="100"                                           SelectedValueBinding="{Binding Type}"                                           ItemsSource="{Binding ElementName=datagrid, Path = ListOfTypes}">                    <dg:DataGridComboBoxColumn.HeaderTemplate>                        <DataTemplate>                            <TextBlock Text="{Binding ElementName=datagrid, Path=DataContext.ColumnFourHeader}" />                        </DataTemplate>                    </dg:DataGridComboBoxColumn.HeaderTemplate>                </dg:DataGridComboBoxColumn>
   <dg:DataGridComboBoxColumn x:Name="_column4" MinWidth="100" SelectedValueBinding="{Binding Type}"

                                           ItemsSource="{Binding ElementName=datagrid, Path = ListOfTypes}">

                    <dg:DataGridComboBoxColumn.HeaderTemplate>

			<DataTemplate>

                            <TextBlock Text="{Binding ElementName=datagrid, Path=DataContext.ColumnFourHeader}" />

                        </DataTemplate>

                    </dg:DataGridComboBoxColumn.HeaderTemplate>

                </dg:DataGridComboBoxColumn>


I would be grateful if anyone could assist me with this issue.

Thank you.
 

 

I have attached a demo that I have been working on. I would be grateful if anyone could assist me with this issue.

Thank you.