Error - a.toLowerCase is not a function

3 posts, 1 answers
  1. briankb
    briankb avatar
    1 posts
    Member since:
    Nov 2004

    Posted 06 Nov 2011 Link to this post

    I've been trying to hookup a AutoComplete widget. It's failed every time I've tried it with the error "a.ToLowerCase is not a function"

    So I added a Grid and bound the same data and it worked as expected. What could be the issue with AutoComplete?


    error is
    a.toLowerCase is not a function
    Line 1

    local data is 
    var myData = [{
        "ID": 8,
        "Title": "Test Title",
        "Ends": "5/30/2011 6:00:00 PM"
    }, {
        "ID": 37,
        "Title": "Test Title 2"
    }];

    The code is 
    $("#autocomplete").kendoAutoComplete({
                    dataSource: myData
                });
     
    $("#grid").kendoGrid({
                    columns: [
                  {
                      field: "ID",
                      title: "ID",
                      width: "10"
                  },
                  {
                      field: "Title",
                      title: "Title"
                  },
                  {
                      field: "Ends",
                      title: "Ends"
                  }],
                    dataSource: {
                        data: myData,
                        pageSize: 5
                    },
                    sortable: true,
                    pageable: true
                });

  2. Answer
    Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 07 Nov 2011 Link to this post

    Hi Briankb,

    You have to specify a dataTextField property in the autocomplete - otherwise the control does not know which field to use for autocompletion.

    See this example for details. 

    Regards,
    Petyo
    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. achmad
    achmad avatar
    1 posts
    Member since:
    Sep 2013

    Posted 20 Sep 2013 Link to this post

    i
Back to Top