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

Combobox - autocomplete

1 Answer 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bruno
Top achievements
Rank 1
Bruno asked on 24 Apr 2012, 04:01 PM
I've defined a combobox this way:
$(document).ready(function () {
        cboSite = $("#SiteId").kendoComboBox({
            minLength: 2,
            suggest: true,
            autoBind: false,
            dataTextField: "text",
            dataValueField: "value",
            dataSource: {
                serverFiltering: true,
                serverPaging: true,
                datatype: 'json',
                transport: {
                    read: {
                        url: '@Url.Action("GetSites", "Equipment", new { area = "Equipment" })',
                        data: {
                            q: function () {
                                return cboSite.text();
                            }
                        }
                    }
                }
                ,
                schema: {
                    data: function (data) {
                        return data.result;
                    }
                }
            }
        }).data("kendoComboBox");
    });

But I have two problems:
- if the data returned by GetSites is empty, this GetSites method is then called endlessly (I see that in firebug, it's like an infinite loop)
- if I return data filtered by the text typed by the user, then the GetSites method is never called again when he types something else

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Keith Engelhardt
Top achievements
Rank 1
answered on 17 Oct 2012, 08:29 PM
I would also like to know how to get a combobox to have this kind of "auto complete" functionality

Keith E.
Tags
ComboBox
Asked by
Bruno
Top achievements
Rank 1
Answers by
Keith Engelhardt
Top achievements
Rank 1
Share this question
or