Hello guys!
I cannot get kendo dropdownlist to show builtin mvc validation message on client side when clicking submit button.
If i remove the kendo initializer the dropdownlist gets rendered as default html select and the validation message is showing client side when clicking submit button.
Strange thing the builtin mvc validation message works for other kendo initialized controls like calendar or autocomplete, but cant get it to work for dropdownlist.
I'm stuck on this one and would surely appreciate your help guys :)
The model entity Person has a int field CompanyID with validation attribute [Required].
The view markup is as follows.
.......................................................
@Html.DropDownListFor(m => m.CompanyID, (IEnumerable<SelectListItem>)ViewBag.CompanyID)
@Html.ValidationMessageFor(m => m.CompanyID)
.......................................................
$(document).ready(function () {
$("#CompanyID").kendoDropDownList()
});
.......................................................
I cannot get kendo dropdownlist to show builtin mvc validation message on client side when clicking submit button.
If i remove the kendo initializer the dropdownlist gets rendered as default html select and the validation message is showing client side when clicking submit button.
Strange thing the builtin mvc validation message works for other kendo initialized controls like calendar or autocomplete, but cant get it to work for dropdownlist.
I'm stuck on this one and would surely appreciate your help guys :)
The model entity Person has a int field CompanyID with validation attribute [Required].
The view markup is as follows.
.......................................................
@Html.DropDownListFor(m => m.CompanyID, (IEnumerable<SelectListItem>)ViewBag.CompanyID)
@Html.ValidationMessageFor(m => m.CompanyID)
.......................................................
$(document).ready(function () {
$("#CompanyID").kendoDropDownList()
});
.......................................................