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

Commented Unassigned: CheckComboBox loses values when scrolled out of view [21917]

$
0
0
I am using a CheckComboBox within a ListView/GridView column, defined as follows...
```
<GridViewColumn Header="Surcharges">
<GridViewColumn.CellTemplate>
<DataTemplate>
<et:CheckComboBox Delimiter=" " DisplayMemberPath="PalletNetworkSurchargeCode" ItemsSource="{Binding Path=SurchargeOptions}" MinWidth="100" SelectedValue="{Binding Path=Surcharges}" ValueMemberPath="PalletNetworkSurchargeCode" Width="100" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
```

Within the View Model, SurchargeOptions is a List<PalletNetworkSurcharge>, PalletNetworkSurcharge.PalletNetworkSurchargeCode is a String, and SurchargeOptions is also a String.

If the user scrolls the list (quickly), or resizes the form in such a way that one or more items in the list is no longer visible, when that item is made visible again (either by more scrolling or more resizing) any items selected in the CheckComboBox are no longer selected and the clearing of the selected items is also reflected in the bound "SelectedValue".

Can you please help. Am I missing something within the Xaml or is there a problem with the control?

Thanks.

Martin.
Comments: ** Comment from web user: MartinRobins **

I do not expect this to make a difference, but just in case it does I also wanted to point out that the List<PalletNetworkSurcharge> used as the ItemsSource is shared; that is every item in the ListView that is displaying the CheckComboBox is sharing the same instance of the List<PalletNetworkSurcharge>.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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