This question is locked. New answers and comments are not allowed.
We have a listbox in edit view for the grid. Everything works fine but when data is saved the selected items in the listbox are not binded to ApplicationID property in the model. We checked the FormCollection and found that the property is returned as ApplicationID[] and that is why binding is not happening. We tested the functionality without grid and didn't face this issue.
View Model:
public class ServerViewModel { public List<int> ApplicationId { get; set; } }View Code :
@(Html.ListBox("Id", new MultiSelectList(ViewBag.Applications,"Value","Text", Model.ApplicationId), new { style = "width: 300px;"}))