Hi,
I'm trying to bind a Kendo.Dropdownlist to an enum in MVC but cant seem to get it working. It binds OK to get the values but when I change the value its not reflected in the ViewModel. I have attached two screenshots of my editor template (one working and one not). The one that works use the built in EnumDropdownListFor but this doesn't have the styling like the Kendo UI. Any ideas how i can get the Kendo dropdown to work?
@model CapType
@{
var enumItems = EnumHelper.GetSelectList(typeof(CapType));
var options = new SelectList(enumItems, "Value", "Text", Model);
}
@(Html.Kendo().DropDownListFor(m => Model)
.Name("eCapType")
.BindTo(options))
I'm trying to bind a Kendo.Dropdownlist to an enum in MVC but cant seem to get it working. It binds OK to get the values but when I change the value its not reflected in the ViewModel. I have attached two screenshots of my editor template (one working and one not). The one that works use the built in EnumDropdownListFor but this doesn't have the styling like the Kendo UI. Any ideas how i can get the Kendo dropdown to work?
@model CapType
@{
var enumItems = EnumHelper.GetSelectList(typeof(CapType));
var options = new SelectList(enumItems, "Value", "Text", Model);
}
@(Html.Kendo().DropDownListFor(m => Model)
.Name("eCapType")
.BindTo(options))