AutoComplete with remote DataSource "contains" filter

3 posts, 1 answers
  1. John Thompson
    John Thompson avatar
    44 posts
    Member since:
    Dec 2009

    Posted 23 Dec 2012 Link to this post

    I there a way to create a remote DataSource for an AutoComplete that uses "contains" instead of "startswith"?  I tried specifying the filter like so:

    $("#SearchFor").kendoAutoComplete({
            minLength: 2,
            dataTextField: "FullText",
            dataSource:
                {
                    type: "json",
                    serverFiltering: true,
                    serverPaging: true,
                    pageSize: 20,
                    filter:
                        {
                            field: "FullText",
                            operator: "contains",
                            value: $("#SearchFor").val()
                        },
                    schema:
                        {
                            data: "data",
                            count: "count"
                        },
                    transport:
                        {
                            read: applicationPath() + "/Home/SearchForStuff"
                        }
                }
            });

    but, it was changed/overridden by the component on the AJAX request.
  2. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 25 Dec 2012 Link to this post

    Hi John,

    Please use the filter option of the AutoComplete.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. John Thompson
    John Thompson avatar
    44 posts
    Member since:
    Dec 2009

    Posted 25 Dec 2012 Link to this post

    Charmingly simple!  Thanks and Merry Christmas!
Back to Top