I’ve made small example on how to place RadGridView inside editable RadComboBox and filter the grid items as you type in the combo:



The easiest way to place any UI element in RadComboBox is to create single RadComboBoxItem and define desired Template:

<telerikInput:RadComboBox Text="{Binding Text, Mode=TwoWay}"
                          IsEditable="True" Height="25" Width="200">
                    <telerikGrid:RadGridView x:Name="RadGridView1" ShowGroupPanel="False" CanUserFreezeColumns="False" 
                                             RowIndicatorVisibility="Collapsed" IsReadOnly="True"
                                             IsFilteringAllowed="False" ItemsSource="{Binding Items}" 
                                             Width="200" Height="150" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">

Now you can create small view model and bind the Text property of RadComboBox to desired FilterDescriptor of our powerful QueryableCollectionView:

    public class MyDataContext : INotifyPropertyChanged
        QueryableCollectionView _Items;
        public QueryableCollectionView Items
                if (_Items == null)
                    _Items = new QueryableCollectionView(from i in Enumerable.Range(0, 10000)
                                                         select new MyObject() { ID = i, Name = String.Format("Name{0}", i) });

                    _Items.FilterDescriptors.Add(new FilterDescriptor("Name", FilterOperator.Contains, ""));
                return _Items;

        string _Text;
        public string Text 
                return _Text;
                if (_Text != value)
                    _Text = value;

                    ((FilterDescriptor)_Items.FilterDescriptors[0]).Value = _Text;



Happy filtering!


About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks


Comments are disabled in preview mode.