Autocomplete w/RemoteData and Knockout all inside a Template?

2 posts, 1 answers
  1. Zach
    Zach avatar
    1 posts
    Member since:
    Nov 2012

    Posted 30 Nov 2012 Link to this post

    We're trying to get the following scenario to work with no luck - can anyone shed light on this?

    We have a jQuery template with a Kendo Autocomplete control inside (an input). The input must be bound to a remote datasource to allow filtering the results on the server. The input is used to pick a code from a set of 20,000+ codes, and the user can select more than one code, thus the input is templated - make sense? The user picks a code, then if another is desired they hit the "another code" button and the template fires off and a new Autocomplete control is born and so on.

    We've spent days trying to get this to work but the combination of the Kendo autocomplete inside the jQuery template, plus the remote data source (which never works), plus ultimately binding the selected code to a model via Knockout, all that together paints a very complex picture. 

    Here are some scenarios we did get working but none suffice for our project:

    - use local data instead of a delegate to remote data. This is not good because it requires us to pull back 20,000+ possible codes onto the client

    - binding the selected code to a model via Knockout - this actually works fine

    Can anyone shed light? Thanks in advance!
  2. Answer
    Burke
    Burke avatar
    41 posts
    Member since:
    Jun 2009

    Posted 30 Nov 2012 Link to this post

    Hi Zach!

    Can you explain more about exactly what isn't working?

    I have tried to reproduce your scenario from what I understand and it was pretty easy to do.  Lets use this as a starting point and we can work from here.  This example uses Kendo UI MVVM (as I am not so familiar with Knockout), but I'm sure we can substitute it out when we get going.

    http://jsbin.com/orisix/1

    Cheers!
  3. Kendo UI is VS 2017 Ready
Back to Top