如何从kendoautocomplete获取所选项目的ID
问题描述:
我需要通过ajax调用从kendoautocomplete到控制器获取所选的项目ID。
我尝试过:
i need to get the selected item id from kendoautocomplete to controller through ajax call.
What I have tried:
@(Html.Kendo().AutoComplete()
.Name("BusinessCategory")
.Placeholder("What do you want to find?")
.DataTextField("Name")
.Events(events => events.Select("BusinessSelect"))
.Filter("startswith")
.MinLength(1)
.HtmlAttributes(new { style = "width:100%" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetcatogoryList", "Lookup")
.Data("onAdditionalData");
})
.ServerFiltering(true);
})
)
答
你真的很想谷歌这样的问题。这是一个专门的图书馆,你最好在teleriks论坛上研究。
看看这个链接:
http: //www.telerik.com/forums/can-i-access-the-data-item-that-was-selected-in-autocomplete-control [ ^ ]
看起来我对你的项目一无所知,你可能需要根据这个帖子中的评论来评估你是否使用了正确的控件。
You really aught to google a problem like this. This is a specialized library that you'd be better off researching in teleriks forums.
Take a look at this link:
http://www.telerik.com/forums/can-i-access-the-data-item-that-was-selected-in-autocomplete-control[^]
Seeing as though i know nothing about your project, you may need to evaluate if you are using the right control based on the comments in this thread.