This code in my view is not producing a visible dropdown list in the browser:
edit template code
@(Html.Kendo().DropDownList()
.Name("Sex")
.BindTo((System.Collections.IEnumerable)ViewData["Sexes"])
.DataValueField("SexId")
.DataTextField("SexName")
)
resulting html
What am I doing wrong here? Please help :)
edit template code
@(Html.Kendo().DropDownList()
.Name("Sex")
.BindTo((System.Collections.IEnumerable)ViewData["Sexes"])
.DataValueField("SexId")
.DataTextField("SexName")
)
resulting html
<input id="Sex" name="Sex" type="text" value="2"/> <script> |
|
jQuery(function(){jQuery("#Sex").kendoDropDownList({dataSource:[{"SexId":1,"SexName":"Male"},{"SexId":2,"SexName":"Female"}],dataTextField:"SexName",dataValueField:"SexId"});}); | |
</script> |
What am I doing wrong here? Please help :)