This question is locked. New answers and comments are not allowed.
Telerik Version 2011.3.1115
This appears to be the same problem as discussed in a previous post, however, the DropDownListFor method does not appear to properly select the initial value of Model.MySelectedValue.
The standard html drop down list properly selects the 'Option C' value, whereas the Telerik drop down list does not.
Happy to upload a sample if necessary, its pretty easy to reproduce.
This appears to be the same problem as discussed in a previous post, however, the DropDownListFor method does not appear to properly select the initial value of Model.MySelectedValue.
var items = new List<
object
>
{
new { Name = "Option A", Value = MyEnum.A},
new { Name = "Option B", Value = MyEnum.B},
new { Name = "Option C", Value = MyEnum.C},
new { Name = "Option D", Value = MyEnum.D},
};
viewModel.MySelectList = new SelectList(items , "Value", "Name");
viewModel.MySelectedValue = MyEnum.C;
return View(viewModel);
@Html.DropDownListFor(o => o.MySelectedValue, Model.MySelectList)
@Html.Telerik().DropDownListFor(o => o.MySelectedValue).BindTo(Model.MySelectList)
The standard html drop down list properly selects the 'Option C' value, whereas the Telerik drop down list does not.
Happy to upload a sample if necessary, its pretty easy to reproduce.