0

I have multiselect dropdown which doesn't populate selected values. It populates all values but selected values are not populating. At the time of debugging I can see the values but its not getting rendered.

@Html.DropDownList("UnitsSelected", new MultiSelectList(Model[0].UnitsSelected, "Value", "Text",  
    Model[0].UnitsSelected.Where(x => x.Selected).ToList()), 
new { @class = "alignCenter", multiple = "multiple", id = "companyUnits" })

I tried solution given in ASP.NET MVC MultiSelectList with selected values not selecting properly But it doesn't solve my case.

Manjay_TBAG
  • 2,176
  • 3
  • 23
  • 43

0 Answers0