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

Load value not working with Autobind(true)

1 Answer 153 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Jérémy
Top achievements
Rank 1
Jérémy asked on 06 Dec 2013, 10:43 AM
Hello,

We have problems with the Multiselect: the initial values ​​don’t bind the control on loading of the component.
RoutesSelected a list of type "DepotViewModel" defined in the datasource.
RouteGuids is a list of Guid type.

 @(Html.Kendo().MultiSelect()                            
.Name("RouteGuids")                             
.DataTextField("Code")                             
.DataValueField("Id")                             
.Placeholder("Select route...")
.AutoBind(true)                            
.Filter("startswith")
.MaxSelectedItems(8)
.Value(Model.RoutesSelected)
.DataSource(source => source.Read(read => read.Action("GetDepots", "Request")).ServerFiltering(false)               
)      
)

Any idea?

Thanks,
Mathieu

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 10 Dec 2013, 10:06 AM
Hello Christophe,

Can you share with us what value is coming out of this variable:

Model.RoutesSelected

You can see what is serialized by inspecting the source of the page (by default ctrl + U in the browser)?

Share with us your findings so we can advise you or if it is easier for you share a small runnable demo.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MultiSelect
Asked by
Jérémy
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or