Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

Too Many Items

$
0
0
I have a form that should have a combobox on it. The problem is that the combobox is bound to a dataview that has somewhere in excess of 32K rows. Clearly, showing or even populating that number is impractical. This is a case where an autocomplete makes sense, which is what I was doing in a WinForms version of this. However, the WPF combobox appears to attempt to load the whole 32K rows. The form locks up tight when I click the down arrow on the combobox. If I limit the dataview to only 10 rows, it works as expected.

I haven't gone searching for this extensively, but with what I have looked for, I haven't seen anybody mention this issue. WinForms knew that populating 32K records was impractical, and binding the CB to at datatable was just fine. In WPF, I'm binding to a DataView rather than a datatable, but I would still expect it to be fine.

What am I missing?

The XAML I'm using looks like this:

Code:

<ComboBox Grid.Column="1" x:Name="cbStreams" ItemsSource="{Binding StreamNameView, Mode=OneWay}" DisplayMemberPath="HName" SelectedValuePath="LLID" MinWidth="240" Height="30" Margin="20,20,20,20"  IsEditable="False"/>

Viewing all articles
Browse latest Browse all 256

Trending Articles



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