I'm trying to display a list of options previously selected.
My model looks like:
public IEnumerable<SelectListItem> ChildrenOptions { get; set; }
public List<Guid> ChildrensId { get; set; }
In the controller I populate the IEnumerable with a MultiSelectList from a list and I pass it to the model
MyModel.ChildrenOptions = new MultiSelectList(myList, "Id", "Name");
return View(myModel);
So if I writte in my View
@Html.DisplayFor(modelItem => item.Children, item.ChildrenOptions)
It displays the Guid/Id, but I would like to display a list of the Names. And if I loop the List with a foreach, then I just have the Guids.
Any idea?
Some posts with helpfull related info I've already visited: