Virtualized Telerik ComboBox for Silverlight

Wednesday, October 28, 2009 by XAML Team | Comments 5

In some scenarios it is required to load thousands of items in a ComboBox. Since by default the control creates RadComboBoxItem containers for each data item, it might take some time to open the drop-down. To resolve the problem you only need to change the RadComboBox ItemsPanel with VirtualizingStackPanel:

<telerikInput:RadComboBox>
    <telerikInput:RadComboBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>
    </telerikInput:RadComboBox.ItemsPanel>
</telerikInput:RadComboBox>

 

thus making the drop-down to open instantly.

Attached is a simple application that loads 1000 items in two RadComboBox controls, one virtualized, the other – not virtualized. The difference between the two controls is visible and becomes much larger if you create 100,000 items!

I hope this helps.

5 Comments

  • Milosz 30 Oct 2009
    Guys, I really like all these small improvements that are being released in the Q3.
  • Valeri Hristov 02 Nov 2009
    This "feature" is available since Q2 SP1 (version 2009.2.812.1030), I just wanted to demonstrate how to use it :)
  • Milosz 02 Nov 2009
    It's good to know then :)
  • Krishna Bayanna 09 Dec 2009
    It really helped. The Performance is very very fast.
  • Balaji 17 Dec 2009
    Using of this VirtualizingStackPanel in my RadComboBox. It works great but the problem is doesnt point the selected item when i type in. any workaround for this.

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)