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

Selected Values null in model binding - how to retrieve values selected?

1 Answer 508 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 28 May 2013, 07:15 PM

Current Kendo version being used is 2013.1.514.340.

The MultiSelect has values and can be selected. When the model is passed to the controller, the value in the model for the MultiSelect, the value is always null.

Below is the code I am using, is this code set up correctly ?

View:
@(Html.Kendo().MultiSelectFor(x => x.x2010ArchitectureModeling)
         .Name("VS2010_Architecture_and_Modeling")
         .Placeholder("Select features...")
         .BindTo(new SelectList(ViewBag.vs2010ArchitectureModeling, "Value", "Text"))
Model:
public IList<string> x2010ArchitectureModeling { get; set; }

Controller:

public ActionResult PlaceOrder(OrderFormViewViewModel model)
        {
             // model.x2010ArchitectureModeling is null here
        }

1 Answer, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 28 May 2013, 08:47 PM
Tags
MultiSelect
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Share this question
or