Showing posts with label RadComboBox. Show all posts
Showing posts with label RadComboBox. Show all posts

Thursday, December 30, 2010

Silverlight Programming: RadComboBox Virtualization

Telerik RadControls' API gives you the ability to configure the RadComboBox to support virtualization, which reduces the memory footprint of the application and speeds up the loading time thus enhancing additionally the UI performance. Some times its required to load thousands of items in a RadComboBox. By default the control creates RadComboBoxItem containers for each data item, so it might take some time to open the drop-down. To resolve the problem you just have to change the RadComboBox's ItemsPanel with VirtualizingStackPanel:

Here is the snippet of code block

<telerik:RadComboBox HorizontalAlignment="Left" TextSearchMode="StartsWith"
IsFilteringEnabled="True" OpenDropDownOnFocus="True" Width="200" 
IsEditable="True" IsDropDownOpen="False" Name="AccountDropDownList" 
SelectedValuePath="customer_number" DisplayMemberPath="customer_name" >
  <telerik:RadComboBox.ItemsPanel>
       <ItemsPanelTemplate>
        <VirtualizingStackPanel />
      </ItemsPanelTemplate>
  </telerik:RadComboBox.ItemsPanel>
</telerik:RadComboBox>

Hope this is useful Nerd smile