Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: CheckComboBox

$
0
0
Hello. My code worked well, but at some point of re-factoring, upgrade Xceed libraries, etc it stopped to work.

I compared all parts of my code with an old one, and everything seems to be the same, except upgraded Xceed libraries to the latest version.

Displaying is working perfectly, but as soon as I expand CheckComboBox, it displays me Id fields instead of DisplayMemberPath field.

If I change CheckComboBox to ComboBox everything works perfectly.

No Binding or other errors in Output window...

Here is my CellEditorTemplate:
<xcdg:CellEditor x:Key="DataGridCheckComboBoxCellEditor">

        <xcdg:CellEditor.EditTemplate>

            <DataTemplate>

                <xctk:CheckComboBox

                                                        HorizontalAlignment="Stretch"

                                                        VerticalAlignment="Center"

                                                        DisplayMemberPath="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.DisplayMemberPath,Mode=OneWay}"

                                                        ItemsSource="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ItemsSource, Mode=OneWay}"

                                                        SelectedValue="{xcdg:CellEditorBinding}"

                                                        ValueMemberPath="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:Cell.CellEditorContext).ForeignKeyConfiguration.ValuePath}"/>

            </DataTemplate>

        </xcdg:CellEditor.EditTemplate>

    </xcdg:CellEditor>
Here is usage of it, inside Grid:
<xcdg:Column Title="Routes"

                                     FieldName="ConflictedRoutes"

                                     CellEditor="{StaticResource DataGridCheckComboBoxCellEditor}" AllowGroup="False"

                                     AllowSort="False" CellEditorDisplayConditions="Always">

                            <xcdg:Column.ForeignKeyConfiguration>

                                <xcdg:ForeignKeyConfiguration

                                    ItemsSource="{Binding Source={StaticResource RouteCollectionViewSource}}"

                                    DisplayMemberPath="Name" ValuePath="Index" />

                            </xcdg:Column.ForeignKeyConfiguration>

                        </xcdg:Column> 

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>