Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

MultiSelect "preselect" value, but also a default value

$
0
0
.Model(model =>
{
    model.Id(group => group.Id);
    model.Field(group => group.Administrators)
        .DefaultValue(new List<MemberViewModel>() { new MemberViewModel() { Id=CurrentUser.Id }});
})

 

My MultiSelect is in a grid, I set the DefaultValue of the MultiSelect with the Model parameter (see above)

This worked fine, until I had to set the value on the MultiSelect to prevent a huge initial lookup

@(Html.Kendo().MultiSelectFor(model => model)
    ..snip..
    .Value(Model.ToList()))

The value appears to be overwriting the DefaultValue, even when the value is blank


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>