Hi,
I have a list of objects in my model
public class SoftwareItemPropertiesViewModel {.... public List<Annotation> Annotations { get; set; } = new List<Annotation>();....
that I render to multiple multiselect like so:
for (var i = 0; i < Model.Annotations.Count; i++) { <div class="form-group"> @Html.Label(Model.Annotations[i].Name) <div class="col-sm-10"> @(Html.Kendo().MultiSelectFor(m => m.Annotations[i].SelectedOptions) .DataTextField("Name") .DataValueField("Value") .BindTo(Model.Annotations[i].Options) .Placeholder(Model.Annotations[i].Placeholder) ) </div> </div> }
On post of the form, I can see that the selected data is there as as expected in Annotations[0].SelectedOptions:
Annotations%5B0%5D.SelectedOptions: 4Annotations%5B0%5D.SelectedOptions: 5Cost: 515Description: adfasdfGuid: 40f339ed-b1e8-4a46-a987-8d5d79ec0be0Name: abcasdfsadfOwnerNotes: SelectedOwners: 1SelectedOwners: 2Version:
However, the selected Values are not populated back in the Model object that I receive.
Annotations List is populated with 1 Annotation as expected, but Annotations[0].SelectedOptions is not populated.
There is another Multiselect directly bound to the model and here I see Selected values in the model as expected.
What am I missing?
Regards Erwin
