• My advice: DO NOT EVER rely on execution delays, manual pauses, or Thread.Sleep() to handle your tests’ timing issues. Ever. Period. Instead, figure out exactly what condition you need to move forward with your test, then create an explicit wait for that condition. This is a rock-solid pattern that works in nearly every situation. Here’s a practical example for you using Telerik’s neat demo of our RadComboBox.
  • Last week we wrote about our new ASP.NET DropDownList control taking some specific functions of our existing ComboBox control, but in a more lightweight and better performing manner. Continuing this trend, it’s time to introduce another of the new members of Telerik’s ASP.NET control suite – the SearchBox.
  • Going through customer feedback several months ago, we realized that there are pretty simple scenarios in which you use our ASP.NET ComboBox, while you could be using a much simpler and more lightweight control designed for the task at hand. We then thought we could ship such controls to substitute some of the ComboBox functionality and allow you to do you job faster and with less code. The newest addition to Telerik’s ASP.NET AJAX controls family is designed to make creating dropdown lists a breeze, delivering flawless looks and great performance. Meet the DropDownList.
  • 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....

  • In my previous article on the same topic I described how to replace the ItemsPresenter of RadComboBox with a RadTreeView. It was as simple as updating the control template. Unfortunately the controls’ selection synchronization relied on a bug in RadComboBox that we recently fixed – the control was able to have a value in its SelectedItem property, that was not present in its Items collection. Now, in order to workaround this new problem, we have to either inherit RadComboBox, or create an attached behavior that will allow us to get the SelectedItem of the inner RadTreeView. The code you have to write...

  • A common request in our support is to display a combo box, containing all values of a specific Enum. This is fairly easy with RadComboBox for Silverlight - all you need to do is to fill its ItemsSource collection with the Enum values. The best way to do this is to create a view model for the Enum:

    using System;
    using System.Collections;
    using System.Linq;
    using System.Reflection;
    
    namespace SilverlightApplication1
    {
        public class EnumModel
        {
            private Type enumType;
    
            public IEnumerable Values { get; private set; }
    
            [TypeConverter(typeof(TypeTypeConverter))]
        ...
  • Recently we received several requests for an example, demonstrating how to put a virtualized GridView in a ComboBox popup. The best way to do this in my opinion is to replace the ItemsPresenter of the ComboBox with a GridView. There is some plumbing that has to be done, but I managed to separate it in two attached behaviors. The original idea is described in my blog post for TreeView in ComboBox which I recently updated with the latest control template of RadComboBox for Silverlight. The principle is exactly the same with RadGridView and it should work with very minor adjustments with...

  • As far as I can tell from the experience of my colleagues with RadControls for ASP.NET AJAX, one of the common feature requests for RadComboBox and RadTreeView is combining them into one piece. Recently we started to receive similar requests for RadComboBox and RadTreeView for Silverlight. Placing a TreeView in a ComboBox sometimes makes a lot of sense, so I decided to research the best way to do it.
     
    The first, the simplest and most obvious way is to place a RadTreeView as content of RadComboBox:

    <input:RadComboBox>
     <nav:RadTreeView
     ItemTemplate="{StaticResource ItemTemplate}"
     ItemsSource="{StaticResource ItemsSource}" />
    </input:RadComboBox>

    This works, but it has one important limitation: RadComboBox cannot...