Hi there,
My form has a combo box that is populated from a viewbag in a controller. The Combobox isn't posting any data when the form is submitted however. I don't get any errors but the values in the database are always null. What have I done wrong?
The Combobox Code
@(Html.Kendo().ComboBox()
.Name("workscopecode")
.DataTextField("Text")
.DataValueField("workscopecode")
.Filter(FilterType.Contains)
.Placeholder("-- Select Duties --")
.BindTo(ViewBag.duties))
My Viewbag in my Controller Code
IEnumerable<SelectListItem> duties = mydata.tbl_workscopes
.Select(c =>
new
SelectListItem
{
Value = c.idx_index.ToString(),
Text = c.code
});
ViewBag.duties = duties;