AutoComplete returning "TypeError: "".toLowerCase is not a function

2 posts, 0 answers
  1. Kathleen
    Kathleen avatar
    1 posts
    Member since:
    Sep 2013

    Posted 21 Oct 2013 Link to this post

    I have a very simple strongly typed datasource that consists of Bills:
    public class BillName
            public string Bill { get; set; }

    And a very simple test case that returns these bills through a WebApi in MVC:

    var dataSource = new{
                transport: {
                    read: {
                        url: "/api/NavBillApi/GetAllBills",
                dataSource: dataSource,
                filter: "startswith",
                dataText: "Bill",
                minLength: 1,
                //ignoreCase: false,
                placeholder: "Select ...",

            public IEnumerable<BillName> GetAllBills()
                var billList = _billsService.GetAllBillNames();
                //var x = billList.Count();
                return billList.AsEnumerable();

    I have tried every option on the datasource and AutoComplete widgets that I have found in the documentation.  If I uncomment ignoreCase: false, then I get the error: Uncaught TypeError: Object [object Object] has no method 'lastIndexOf'.
    I am out of ideas.  Thanks for any help.
  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 22 Oct 2013 Link to this post

    Hello Kathleen,

    The dataTextField property was not defined correctly in the AutoComplete definition. Check this jsBin demo, which shows how it should be defined.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top