Kendo autocomplete not working

2 posts, 0 answers
  1. Devon
    Devon avatar
    2 posts
    Member since:
    Jan 2016

    Posted 19 May 2016 Link to this post

    I'm trying to setup auto-completion on a single column in my grid. This is being implemented in a backbone+marionette app. I'm following this example for the implementation http://jsfiddle.net/OnaiBai/Naka3/18

    The view is instantiated in my controller. Nothing happens when I enter text into the input box. Also there aren't any JS errors. 

    I can include more of the code if necessary. Any ideas on how I can get the auto-completion to work.

    Template App.Templates.Search.SearchBoxStuff : 

    <label class="search-label" for="searchBox">Search Grid:</label>
    <input type="search" id="searchBox" class="k-textbox text-input">

     

    View:

    App.SearchStuff.GridView = App.Common.Widgets.Grid.extend({
        /**
         * Constructor
         */
        constructor: function (options) {
            App.Common.Widgets.Grid.call(this,
                _.extend({
                    toolbar: [
                        { template: App.Templates.Search.SearchBoxStuff }
                    ],
                    dataSource: {
                        type: 'odata',
                        pageSize: 100,
                        serverFiltering: true,
                        serverPaging: true,
                        serverSorting: true,
                        sort: {
                            field: 'name',
                            dir: 'asc'
                        },
                        schema: {
                            model: {
                                fields: {
                                    id: {type: 'number'},
                                    name: {type: 'string'}
                                 
                        
     
                                }
                            }
                        },
                        transport: {
                            read: {
                                url: '/api/package/search/v1',
                                dataType: 'json',
                                type: 'POST',
                                contentType: 'application/json'
                            },
                            parameterMap: _.bind(this._parameterMap, this)
                        }
                    },
                    height: 700,
                    scrollable: {
                        virtual: true
                    },
                    selectable: 'row',
                    sortable: true,
                    pageable: false,
                    columns: [{
                        field: 'name',
                        title: 'Name'
                    }
     
                }, options));
     
    $('.text-input').kendoAutoComplete({
                dataTextField: 'name',
                dataVextField: 'name',
                dataSource: this.dataSource
            });
     
        },

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 23 May 2016 Link to this post

    Hello Devon,

    I will ask you to send us a repro demo that demonstrates the issue. 

    In general, if you would like to use the AutoComplete widget as an editor, you will need to bind the model field to the editor. Nevertheless, I will be able to chime in more here once the repro demo is accessible.

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