Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Editable combobox problem

$
0
0
Thank you for your answer.

I couldn't get it work in my context without using the"Text" property of the combo. The binding of this property was not correct in my first post ! (missing RelativeSource)

After correction, it's ok for me with the code below.
Now, user can type a new value and this value is correctly propagated to the model.
<xcdg:Column FieldName="FlangeType"  Title="Flange Type"  Width="80" >
                                    <xcdg:Column.CellEditor>
                                        <xcdg:CellEditor>
                                            <xcdg:CellEditor.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox
                                                        ItemsSource="{Binding DataContext.FlangeTypes, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
                                                        SelectedValue="{xcdg:CellEditorBinding}"
                                                        __Text="{Binding DataContext.CurrentDrumStandard.FlangeType, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, UpdateSourceTrigger=LostFocus}"
__                                                      IsEditable="True"/>
                                                </DataTemplate>
                                            </xcdg:CellEditor.EditTemplate>
                                        </xcdg:CellEditor>
                                    </xcdg:Column.CellEditor>
                                </xcdg:Column>



Viewing all articles
Browse latest Browse all 2157

Trending Articles



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