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

autocomplete and mvvm

1 Answer 85 Views
AutocompleteBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Viktoras
Top achievements
Rank 1
Viktoras asked on 24 Dec 2013, 11:23 PM
Hi. Sorry for my english.

I'm newbie in rad controls for wp, and bought them just today. Problem is, that i want to write applications "as it must be" and very like mvvm pattern. I like mvvmlight. Is it some right, simple ways to use autocomplete with mvvm bindings?

I need to take data from web service.

public MainViewModel()
{
    this.Items = new ObservableCollection<ItemViewModel>();
    this.Provider = new WebServiceAutoCompleteProvider();
    //??? this.radAutoCompleteBox.InitSuggestionsProvider(this.provider); ???
    this.Provider.InputChanged += this.OnProvider_InputChanged;
 }

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Dec 2013, 09:06 AM
Hi Viktoras,

Thank you for writing.

The WebServiceAutoCompleteProvider structure provides you with an easier way to connect the auto complete and the web service that you have. However, it requires initialization through the InitSuggestionsProvider method. Your other option is to use the SuggestionsSource property and bind it to an observable collection that you manually populate in your ViewModel. More information about RadAutoCompleteBox is available in our online documentation here.

If you need further assistance, don't hesitate to write us back.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
AutocompleteBox
Asked by
Viktoras
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or