This is a migrated thread and some comments may be shown as answers.

MultiSelect BindTo List<string> not posting selected values

1 Answer 196 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 2
Eric asked on 25 Jul 2014, 02:08 PM

Hi - I just have a list of strings to bind.

I get the list from splitting a comma separated list...

I want the list of selected values posted to the server:

‚Äč var multiselections = Model.InformationIntakeGroupOption.Split(new char[] {','}).ToList();
 @(Html.Kendo().MultiSelectFor(model => model.InformationIntakeValue)
 .Placeholder("Click here to select opitons...")
 .BindTo(multiselections)
 .AutoClose(false)
 .Animation(false)
 )

All I get is the first selected value, not all selected values...

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 2
answered on 25 Jul 2014, 03:00 PM
Sorry - my model was incorrect.

It must be: public string[] InformationIntakeValue { get; set; } and not just string!
Tags
MultiSelect
Asked by
Eric
Top achievements
Rank 2
Answers by
Eric
Top achievements
Rank 2
Share this question
or