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

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

4 Answers 172 Views
Map
This is a migrated thread and some comments may be shown as answers.
Matt Dufrasne
Top achievements
Rank 1
Matt Dufrasne asked on 26 Aug 2016, 03:03 PM
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?

4 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 30 Aug 2016, 08:19 AM
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.
 
0
Matt Dufrasne
Top achievements
Rank 1
answered on 07 Sep 2016, 09:25 PM

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

0
Georgi Krustev
Telerik team
answered on 09 Sep 2016, 07:57 AM
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.
 
0
Matt Dufrasne
Top achievements
Rank 1
answered on 13 Sep 2016, 03:10 AM
Thanks Georgi. I was able to tweak the code in the change event of multiselect and its working now.
Tags
Map
Asked by
Matt Dufrasne
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Matt Dufrasne
Top achievements
Rank 1
Share this question
or