AutoComplete Suggest not working

4 posts, 0 answers
  1. 1zias01
    1zias01 avatar
    12 posts
    Member since:
    Sep 2012

    Posted 04 Mar 2012 Link to this post

    I have an AutoComplete calling an ajax-enabled WCF service using JSON.  it's works fine and I get results when I type into the Input.  However I would also like to programmatically set the input value and have results returned.  I tried to use the example below.  And it sets the input box but it's not getting data and the drop down results aren't showing up.   How do I get this to work?

    Forces a suggestion onto the text of the AutoComplete.

    Example

    // note that this suggest is not the same as the configuration method
    // suggest which enables/disables auto suggesting for the AutoComplete
    //
    // get a referenence to the Kendo UI AutoComplete
    var autoComplete = $("#autoComplete").data("kendoAutoComplete");

    // force a suggestion to the item with the name "Inception"
    autoComplete
    .suggest("Inception");
  2. 1zias01
    1zias01 avatar
    12 posts
    Member since:
    Sep 2012

    Posted 05 Mar 2012 Link to this post

    Anyone alive out there?!
  3. Kendo UI is VS 2017 Ready
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 06 Mar 2012 Link to this post

    Hi Chris,

     I believe that you need to use the search method to filter the DataSource. Check this help topic for more information.

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. 1zias01
    1zias01 avatar
    12 posts
    Member since:
    Sep 2012

    Posted 06 Mar 2012 Link to this post

    Whoops spoke too soon.

    Looks like I have to call both like so:

    var autoComplete = $("#autoComplete").data("kendoAutoComplete");

    // force a suggestion to the item with the name "Inception"
    autoComplete
    .suggest("Inception");
    autoComplete.search("Inception");

    That did it.  What a relief.


    Thanks
Back to Top
Kendo UI is VS 2017 Ready