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

Preloading item in Multiselect MVVM

3 Answers 215 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Veteran
Neeraj asked on 11 Aug 2017, 12:22 PM

I am trying to preload item in Multiselect using the  are not getting preloaded. via is array not  

Javascript console object is seen as: 

HTML for kendo in is :

<select class="request-via-multiselect" data-role="multiselect" data-max-selected-items="2"
   data-value-primitive="true" data-item-Template="AirportTemplate" data-text-field="Code"
   data-value-field="Code" data-bind="value: ArriveDepartDetails.via, source: ViaSource"></select>

 

via structure: 
 via[] : ["xyc"]

viaSource structure:

ViaSource: new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: rootUrl("GetData/GetCountry"),
                            dataType: "json"
                        }
                    },
                    serverFiltering: true
                }),

 

 

 

3 Answers, 1 is accepted

Sort by
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 14 Aug 2017, 09:19 AM
please check updated post here
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 14 Aug 2017, 12:18 PM
It got solved !! i was not sending a property of in response. think in MVVM we need to send every property of which is used  it was not working 
0
Stefan
Telerik team
answered on 15 Aug 2017, 07:05 AM
Hello Neeraj,

I'm glad to hear that the issue is resolved.

I also review the other post, and the multiSelect was working as expected on my and with the provided data format and the MultiSelect options:

http://dojo.telerik.com/OMaZi

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
Neeraj
Top achievements
Rank 1
Veteran
Answers by
Neeraj
Top achievements
Rank 1
Veteran
Stefan
Telerik team
Share this question
or