Kendo multiselect doesn't set pre-loaded value with 2016.1.226

5 posts, 1 answers
  1. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 26 Aug Link to this post

    This is regarding bug with Kendo MultiSelect control.
    We have updated kendo UI version from 2014.3.1411 to 2016.1.226
    Below code was working fine with version 2014.3.1411 for kendo multiselect (It was able to perform below operations)
    1. set pre-loaded value in kendo multiselect
    2. data filtering while typing in kendo multiselect.

      ms = $(this).kendoMultiSelect({
                    itemTemplate: inlineTemplate,
                    tagTemplate: tagTemplate,
                    delay: 200,
                    placeholder: placeHolder,
                    minLength: 3,
                    maxSelectedItems: maxSelects,
                    autoBind: true,
                    change: change,
                    select: select,
                    dataSource: preSelected,
                    dataValueField: returnField,
                    value: preSelectedObjectSids,
                   dataTextField: "DisplayName"               
                }).data("kendoMultiSelect");
        ms.setDataSource(ds);

    Now, The above operations has stopped working due to upgrade in its version to 2016.1.226

    Tried to set multiselect value i.e. ms.value(preSelectedObjectSids) but it doesn't work.

    when i remove  ms.setDataSource(ds) from above code, kendomultiselect holds the pre-loaded value but then it changes the entire datasource to single pre-loaded value. Obviously i cannot search or set any other value further in the multiselect

    Is this known issue in latest kendo UI version 2016.1.226?

    Could you suggest what i can try to fix this problem?
  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 30 Aug Link to this post

    Hello Matt,

    Indeed, several breaking changes were introduced in 2015 releases, which are documented here:

    http://docs.telerik.com/kendo-ui/backwards-compatibility/2015/2015-backward-compatibility

    The behavior you are seeing is related to the fact that we select only items that are present in the data source. Initially, the widget starts with empty source and as a result the values are ignored.

    In order to achieve your goal, you will need to select the value manually. The code should look something like this:
    ds.one("change", function() {
      ms.value(preSelectedObjectSids);
    });
     
    ms.setDataSource(ds);

    Regards,
    Georgi Krustev
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 07 Sep Link to this post

    Thanks for the response. But it didn't work.

    What was the fix for this problem?

    https://www.telerik.com/account/support-tickets/view-ticket?threadid=834328

  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 09 Sep Link to this post

    Hello Matt,

    If I recall correctly, the fix was the introduction of a specific multiselect MVVM value binding, which improves the overall behavior of the widget. Nevertheless, I could be mistaken, as the related thread is more then 2 years old.

    In order to continue with the investigation, the best solution is to present a repro Dojo demo that we can observe locally.  

    Regards,
    Georgi Krustev
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  6. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 12 Sep in reply to Georgi Krustev Link to this post

    Thanks Georgi. I was able to tweak the code in the change event of multiselect and its working now.
Back to Top
Kendo UI is VS 2017 Ready