The following dropdownlist will not ever select any item except for the first (index 0):
var clientList = HtmlExtensionMethods.GetClients().Select(c => new SelectListItem { Text = c.Value, Value = c.Key }).ToList();
@(Html.Kendo().DropDownListFor(model => model.ClientID)
.Name("ClientID")
.BindTo(clientList)
.DataTextField("Text")
.DataValueField("Value")
.Value(Model.ClientID)
.Text(Model.ClientName)
.HtmlAttributes(new { @class = "select wfull" })
)
I have tried removing the Value and Text methods and adding .SelectedIndex(2) which does not work either. The model.ClientID is a value in the selectlistitem. How in the world can I get this dropdown to select the item with the value from model. Nothing seems to work.
v2014.3.1314