I have a column with combobox as editor template. If I type name, it'll select the item and update the model when lost focus. But if I mouse click on an item, it will blank the field.
column binding:
columns.Bound(c => c.ServiceCompany).EditorTemplateName("SharedNameComboBox");
template:
<
script
>
function onSelect(e) {
e.sender.value(e.dataItem);
e.sender.trigger("change");
}
</
script
>
@(
Html.Kendo().ComboBox()
.HtmlAttributes(new { data_bind = "value: " + ViewData.TemplateInfo.HtmlFieldPrefix})
.Name(ViewData.TemplateInfo.HtmlFieldPrefix)
.Filter(FilterType.StartsWith)
.Suggest(true)
.BindTo(ViewData as IEnumerable<
string
>)
.Events(e => e.Select("onSelect"))
)
How can I update model upon mouse-click?