如何捕获kendo自动完成角度中的用户输入

时间:2016-04-20 09:59:01

标签: jquery kendo-ui autocomplete kendo-asp.net-mvc

目前我已经使用服务器过滤选项

创建了一个剑道角度自动完成组件

我的HTML是

<input kendo-auto-complete
    k-placeholder="'Select customer'"
    k-filter="'startswith'"
    k-data-text-field="'name'"
    k-data-value-field="'value'"
    k-auto-bind="false"
    k-data-source="customerLookup"
    k-min-length="3"/>

我的脚本是

$scope.customerLookup = {
            type: "odata",
            serverFiltering: true,
            transport: {
                read: {
                    url: "http://localhost/api/customerData?type=validCustomer",
                    dataType: "json"
                }
            }
        };

当我在自动完成中输入文字时,以下调用正在发生

http://localhost/api/customerData?type=valiCustomer&%24inlinecount=allpages&%24filter=startswith(tolower(name)%2C&#39;贝拉&#39)

这里的输入文字是:bella

如何在服务器端捕获输入文本,这样我就可以在服务器端过滤输出

通过使用以下模型,我可以捕获URL中的类型

    [DataMember(Name = "type")]
    public LookupTypes Type { get; set; }

同样如何捕获用户输入的文本?

非常感谢

0 个答案:

没有答案