Combox boxes broken in a sub DataGrid

Nov 11, 2008 at 7:04 PM
Edited Nov 11, 2008 at 7:20 PM
Hi,

All the combox defined in sub DataGrid belonging to a DataGrid.RowDetails are broken : They do show value but binding does not occur back ! So you can't choose any value...
It looks like a DataGrid bug because if the combo is in the main grid, it works fine !!

 How can I workaround it ? I'm very annoyed by this issue.

Thanks !

The following code exhibit the issue:

  <Grid>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>

        <toolkit:DataGrid Grid.Row="0" Name="tagGrid" AutoGenerateColumns="False" CanUserAddRows="False">
            <toolkit:DataGrid.Columns>

                <!-- Display the name of the file -->
                <toolkit:DataGridTextColumn Header="Image" Width="SizeToCells"  
                                           Binding="{Binding Path=DiskPath}"
                                           IsReadOnly="True"/>

<!--- THIS COMBO BOX IS WORKING FINE ! -->

                <toolkit:DataGridComboBoxColumn Header="Categorie" SelectedValueBinding="{Binding Path=CatName, Mode=TwoWay}" IsReadOnly="False"
                                                            ItemsSource="{Binding Source={StaticResource Categorieslookup}}"
                                                            />
            </toolkit:DataGrid.Columns>

            <toolkit:DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <toolkit:DataGrid ItemsSource="{Binding Path=KeywordsForPicture}" AutoGenerateColumns="False" CanUserAddRows="False">
                        <toolkit:DataGrid.Columns>
                            <toolkit:DataGridCheckBoxColumn Header="Utiliser"
                         Binding="{Binding Path=TagIt}"/>

                            <toolkit:DataGridTextColumn Header="Tag" Width="SizeToCells"  
                                           Binding="{Binding Path=TagName}"
                                           IsReadOnly="False"/>

<!-- THIS COMBO BOX DOES NOT UPDATE !!!! -->

                            <toolkit:DataGridComboBoxColumn Header="Categorie" SelectedValueBinding="{Binding Path=CatName, Mode=TwoWay}" IsReadOnly="False"
                                                            ItemsSource="{Binding Source={StaticResource Categorieslookup}}"
                                                            />
                        </toolkit:DataGrid.Columns>
                    </toolkit:DataGrid>
                </DataTemplate>
            </toolkit:DataGrid.RowDetailsTemplate>
        </toolkit:DataGrid>

        <Button Name="valid_btn" Click="valid_btn_Click" Grid.Row="1">Ok</Button>
    </Grid>
Coordinator
Nov 13, 2008 at 2:23 PM
See this thread, http://www.codeplex.com/wpf/Thread/View.aspx?ThreadId=39696.