Hi Telerik Team,
We are facing an issue with the Kendo ComboBox Control on MVC5.
Is there any way to avoid/deactivate the AutoPostBack of the ComboBox when the user press the enter key? We've tried to bind by jQuery other functions on keypress and keydown events without luck.
Here is the code:
@(Html.Kendo().ComboBox()
.Name(
"cmbUsuarios"
)
.DataTextField(
"NombreUsuario"
)
.DataValueField(
"Id"
)
.Placeholder(
"Seleccione Usuarios..."
)
.Filter(FilterType.StartsWith)
.AutoBind(
false
)
.HtmlAttributes(
new
{ @
class
=
"form-control"
, @style =
"width: 100%"
})
.MinLength(2)
.DataSource(source =>
{
source.Read(read =>
{
read.Action(
"GetUsers"
,
"Perfil"
)
.Data(
"filterUsers"
).Type(HttpVerbs.Get);
})
.ServerFiltering(
true
);
}))
<script>
function
filterUsers() {
return
{
userFilter: $(
"#cmbUsuarios"
).data(
"kendoComboBox"
).text()
};
}
</script>
Version of Kendo.Mvc: 2015.1.318.545
Thanks!