This is a migrated thread and some comments may be shown as answers.

RadComboBox Autocomplete

3 Answers 156 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Broken
Top achievements
Rank 1
Broken asked on 19 Jul 2011, 12:33 PM

I can't figure out how to implement autocomplete functionality using your ComboBox.

In XAML I have:
<telerik:RadComboBox IsEditable="True" ItemsSource="{Binding ItemList}" Text="{Binding ItemText, Mode=TwoWay}"/>

In ViewModel I have:

        private string _itemText;
        public string ItemText
        {
            get { return _itemText; }
            set
            {
                _itemText = value;
                RaisePropertyChanged("ItemText");
                GetItems();
            }
        }
        private ObservableCollection<Item> _Items;

        public ObservableCollection<Item> Items
        {
            get { return _Items; }
            set
            {
                _Items = value;
                RaisePropertyChanged("Items");
            }
        }
        private void GetItems()
        {
            _service.BeginGetItems(ItemText, 0, (ar) => Items = _service.EndGetItems(ar), null);
        }
And of course this doesn't work because autofill will messup ItemText, there should be some kind of SearchText property on Combobox which contains text without autofill to which I can bind to, but I have not found one.

3 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 22 Jul 2011, 10:21 AM
You are right, you need a propertly like SearchText in order to use custom autocomplete, but RadComboBox does not have such property yet.

The best that you could do is to disable the integrated autocomplete and the filter and implement a custom filter, like the attached application.

Kind regards,
Valeri Hristov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Jenny
Top achievements
Rank 1
answered on 12 Jun 2012, 11:19 AM
Hi,

Is the solution presented in this forum still the most up to date method of achieving on demand loading with the Silverlight RadComboBox?
If not please provide an updated example.

Thanks
0
Yana
Telerik team
answered on 13 Jun 2012, 06:48 AM
Hello Jenny,

Yes, this is the latest solution, you should be able to use it without a problem.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ComboBox
Asked by
Broken
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Jenny
Top achievements
Rank 1
Yana
Telerik team
Share this question
or