So I have a couple of lists inside a WPF ComboBox inside a datagrid (DataGridComboBoxColumn and DataGridTemplateColumn's with ComboBox).
However when I change the selected item for a ComboBox, keep my mouse hovering over the list and then scroll, the selected Item changes.
Because I have this inside a DataGrid (that can have a scrollbar, and because some lists have 4000+ items I want to avoid that this can happen for the end user however I can't seem to find how to disable this scrolling feature.
I've searched the corners of the Internet far and wide but I can't seem to come up with a proper solution for this problem.
This is my source code for one of the ComboBoxes:
<!-- Processed status -->
<DataGridComboBoxColumn Header="Parsed Status"
SelectedItemBinding="{Binding Status}"
Width="auto">
<DataGridComboBoxColumn.ElementStyle>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="ItemsSource"
Value="{Binding StatusList}" />
</Style>
</DataGridComboBoxColumn.ElementStyle>
<DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="ItemsSource"
Value="{Binding StatusList}" />
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
</DataGridComboBoxColumn>
Now here's the kicker to the issue. The entire application is written in MVVM so the fix should be implemented entirely without code-behind. :)
Thank you for taking a look.
Kind regards.