AutoComplete error/crash/bug/pain/help

2 posts, 0 answers
  1. ERIC
    ERIC avatar
    1 posts
    Member since:
    Jan 2013

    Posted 19 Mar 2013 Link to this post


    I am using the autocomplete widget from the kendo ui web library and experiencing a reproduceable bug. The client javascript error being thrown is "toLowerCase is an undefined function or method". Below is my code.

    var transport = {
            read: {
                url: "ServicePackageOffers",
                dataType: "json",
                data: {},
                cache: true
        var filterDataSource = new{
            transport: transport,
            serverFiltering: false,
            sort: {
                field: "PackageName",
                dir: "asc"
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        PackageName: { editable: false, nullable: false, type: "string" },
                        PackageOfferName: { editable: false, nullable: false, type: "string" },
                        ClubName: { editable: false, nullable: false, type: "string" },

    .Placeholder("Search Products...")
    .HtmlAttributes(new { style = "width: 100%; height: 100%" })                                

    $(document).ready(function () {
            $("#autocomplete").closest('.k-autocomplete.k-widget').keyup(function (e) {
                var val = $('#autocomplete').data().kendoAutoComplete.value();

    The exception gets thrown any time I select an item from the autocomplete list popup. The error occurs here, when I call datasource.filter.

    function onFilterValueChanged(e) {
                filters: [               
                    { field: "PackageOfferName", operator: "contains", value: e }

    However, if i change the control renderer to this:
    <span class="k-textbox k-space-left" style="width: 100%; height: 30px">
    <a href="#" id="itemFilterCommand" class="k-icon k-i-search"> </a>
    <input id="autocomplete" style="width: 100%; height: 100%; padding: 0px" />

                minLength: 1,
                dataTextField: "PackageOfferName",
                filter: "contains",
                placeholder: "Search Products..."

    The error no longer throws, and everything works fine. But I dont want to do that, I want to do what I want to do and use the server wrappers. So... can someone try to explain why I am experiencing what I am experiencing.

  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 21 Mar 2013 Link to this post

    Hello Eric,

    It is hard to determine what cause the problem depending on the given information. I attached a simple test project, which shows different AutoComplete setups and everything works as expected. I will ask you to modify the attached one or prepare a separate test project, which replicates the problem. Thus we will be able to observe the issue locally and advice you further.

    Kind 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!
Back to Top