autocomplete and mvvm

Thread is closed for posting
2 posts, 0 answers
  1. Viktoras
    Viktoras avatar
    3 posts
    Member since:
    Oct 2013

    Posted 24 Dec 2013 Link to this post

    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;
  2. Todor
    Todor avatar
    798 posts

    Posted 30 Dec 2013 Link to this post

    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.

    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top