Is possible to set selected values of the multiselect which are not part of the current multiselect client values: currently, bounded data of the mult

4 posts, 0 answers
  1. Baha Ganayim
    Baha Ganayim avatar
    1 posts
    Member since:
    May 2010

    Posted 28 Mar 2013 Link to this post



     

     

     
    Hi, 
     Is possible to set selected values of the multiselect which are not part of the current multiselect client values:  currently, bounded data  of the multilist


    When working  with datatasource  which is OData Service, not all data is brought to the client.(All the data is found on the server).  But we still need to mark the selected values of the
    multilist. Part of them is not on the client currently

    Thanks,

     
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Mar 2013 Link to this post

    Hello Baha,

     
    MultiSelect widget allows to select only items, which ara part of the DataSource's view. If you need to show selected items on initial load when widget is not bound yet, then you can use the following approach.

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. TomW
    TomW avatar
    2 posts
    Member since:
    Oct 2012

    Posted 08 Aug 2013 Link to this post

    Hi

    I am using the above example, however I need to track when an item is removed., I currently use the below code to track items which have been deleted from the multiselect.  This works fine for items added during a normal search, but if I have preloaded the selected values, it doesnt find them?

    change: function (e) {
                var previous = this._savedOld;
                var current = this.value();
                var diff = [];
                if (previous) {
                    diff = $(previous).not(current).get();
                }
                this._savedOld = current.slice(0);
                // diff has the elements removed do whatever you want...
     
                if (diff.length > 0) {
                    var urltag = "../Dashboard.svc/TagsDelete?EventOrJobNo=" + gridRowToolTipJson.JobNo + "&Tag=" + diff[0];
     
                    $.ajax({
                        // type: "POST",
                        type: "GET",
                        contentType: "application/json; charset=utf-8",
                        url: urltag,
                        dataType: "jsonp",
                        success: function (data, textStatus, xmlHttp) {
     
     
                        }
                    });
                }
            },
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 Aug 2013 Link to this post

    Hello Tom,

     I tried a similar approach to yours which seems to work ok. Here is a live demo: http://jsbin.com/atoqox/1/edit

    Regards,
    Atanas Korchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready