This question is locked. New answers and comments are not allowed.
Hello,
how do i bind a List from ViewData to the "ComboboxFor" Html-Helper? Visual Studio says that the value is null....
Controller:
View:
Does someone know whats wrong?
Regards,
Tim
how do i bind a List from ViewData to the "ComboboxFor" Html-Helper? Visual Studio says that the value is null....
Controller:
var bearbeitungsorte = (from beabreitungsort in _db.KA_KT_Bearbeitungsort select beabreitungsort).ToList(); ViewModel.ListeBearbeitungsort = bearbeitungsorte;
View:
@Html.Telerik().ComboBoxFor(model => model.Bearbeitungsort) .BindTo(new SelectList(View.ListeBearbeitungsort, "Bearbeitungsort", "Text"))
Does someone know whats wrong?
Regards,
Tim