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

Commented Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource.
This is my xaml:
```
<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" DisplayMemberPath="Title"/>
```
Also when I use below ItemTemplate droppbox shows right string and combobox shows selected entity names!
```
<DataTemplate x:Key="DisplayTemplate" DataType="{x:Type model:CMN_KeyValue}">
<TextBlock Text="{Binding Title}"/>
</DataTemplate>

<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" ItemTemplate="{StaticResource DisplayTemplate}"/>
```
I use 2.1 version
Comments: ** Comment from web user: ShahramShobeiri **

Hi,

> So the DisplayMemberPath will be used to get the property named "Value of DisplayMemberPath " on the object and display its content : in the dropbox and in the comboBox.


In my case __DisplayMemberPath__ does not set correct content for __both__ dropbox and comboBox.The content of combobox(the "Text" property) is correct but the dropdown shows objects names. I used ItemTemplate as an alternative way but as I said it does not work either(reverses the problem between combobox and dropdown).


Viewing all articles
Browse latest Browse all 4964


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