Preloading item in Multiselect MVVM

4 posts, 0 answers
  1. Neeraj
    Neeraj avatar
    48 posts
    Member since:
    May 2015

    Posted 11 Aug Link to this post

    I am trying to preload item in Multiselect using MVVM . the multiselect  values are not getting preloaded. via is simple array not complex .  

    Javascript console object is seen as: 

    HTML for kendo in mvvm 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
                    }),

     

     

     

  2. Neeraj
    Neeraj avatar
    48 posts
    Member since:
    May 2015

    Posted 14 Aug Link to this post

    please check updated post here
  3. Neeraj
    Neeraj avatar
    48 posts
    Member since:
    May 2015

    Posted 14 Aug Link to this post

    It got solved !! i was not sending a property of object in response. i think in MVVM we need to send every property of object which is used thats it was not working 
  4. Stefan
    Admin
    Stefan avatar
    1147 posts

    Posted 15 Aug Link to this post

    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.
Back to Top