This question is locked. New answers and comments are not allowed.
Hi,
I have this combobox:
The problem occurs when I enter my own text in the control, then I get: The field CustomerID must be a number.
CustomerIDs type is int. Shouldn't the value automatic be 0 then?
You have exactly the same behavior on your demo page:
http://demos.telerik.com/aspnet-mvc/combobox/clientvalidation
I haven't set any validation attribute on my viewmodel so I don't understand why it page stops on it.
How should I solve this?
Can validation be turned off when entering a custom text?
Regards,
Mattias
I have this combobox:
@{Html.Telerik() .ComboBox() .Name("CustomerID") .Encode(false) .BindTo(new SelectList((IList<SelectListItem>)ViewData["SelectListCustomers"], "Value", "Text")) .AutoFill(false) .HtmlAttributes(new { @class = "fake-autocomplete", style = "width: 300px" }) .HighlightFirstMatch(true) .ClientEvents(events => events.OnChange("CustomerChange")) .Filterable(filter => filter.FilterMode(AutoCompleteFilterMode.Contains)) .Value(Model.CustomerID.ToString()) .Render(); }The problem occurs when I enter my own text in the control, then I get: The field CustomerID must be a number.
CustomerIDs type is int. Shouldn't the value automatic be 0 then?
You have exactly the same behavior on your demo page:
http://demos.telerik.com/aspnet-mvc/combobox/clientvalidation
I haven't set any validation attribute on my viewmodel so I don't understand why it page stops on it.
How should I solve this?
Can validation be turned off when entering a custom text?
Regards,
Mattias