This is a migrated thread and some comments may be shown as answers.

Error - a.toLowerCase is not a function

2 Answers 982 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
briankb
Top achievements
Rank 1
briankb asked on 07 Nov 2011, 01:41 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 07 Nov 2011, 09:10 AM
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!
0
achmad
Top achievements
Rank 1
answered on 20 Sep 2013, 05:45 PM
i
Tags
AutoComplete
Asked by
briankb
Top achievements
Rank 1
Answers by
Petyo
Telerik team
achmad
Top achievements
Rank 1
Share this question
or