0
votes

When I am using a MutliSelect Kendo control, it is not populating the pre selected items. e.g. when it loads it is not loading the ones define in my model

Model.WheelsetExchanges[i].ReasonCodeIds

The kendo control looks like this

@(Html.Kendo().MultiSelectFor(x => Model.WheelsetExchanges[i].ReasonCodeIds)
    .Placeholder("Select Reason Code...")
    .DataTextField("Value")
    .AutoClose(false)
    .DataValueField("Id")
    .HtmlAttributes(new { @class = "multiselect--clause" })
    .DataSource(source =>
    {
        source.Read(read =>
        {
            read.Action("GetWerReasonCodes", "ReferenceData");
        })
        .ServerFiltering(true);
    })
)

Any idea why the previous selected reason codes are not being displayed when I load the page?

1

1 Answers

1
votes

It seems okay what you're doing on the view- but can you check whether you're getting data on the server side?