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

Multi select clears on read with version 2015.1.408

7 Answers 102 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 13 May 2015, 02:30 PM
I am using cascading with a combo box and a multi select
box. You first choose a server in the combo box which gives you a list of users
from that server for the Multi select box. Previous to my upgrading to
2015.1.408 you were able to select multiple servers and multiple users and the
Multi select retained all the previously selected users. With the upgrade to
2015.1.408 the Multi select box is cleared on every read/cascade from the combo
box. We have been using this functionality for over a year now is this a bug or
functionality that you no longer support? Here’s my code.

 <div class="form-group">

                    <h5>Select Server: @Html.Raw(ViewBag.SERVER) </h5>

                    @(Html.Kendo().DropDownList()

                          .Name("ServerID")

                          .OptionLabel(Resources.Select_Server)

                          .DataTextField("ServerName")

                          .DataValueField("ServerID")

                          .HtmlAttributes(new { required = "required",
validationMessage = "Please select a
Server" })

                          .DataSource(source
=>

                          {

                              source.Read(read
=>

                              {

                                  read.Action("GetServers", "DropdownMenus", new { area = "Shared" });

                              });

                          }).Events(e =>
e.Change("onServerChange"))

                          )

                </div>

                <span class="form-group
divider" style="width:400px;">

                    <h5>Select Agent: @Html.Raw(ViewBag.AGENT)</h5>

                    @(Html.Kendo()

                          .MultiSelect()

                          .Name("AgentID")

                          .Placeholder("Select multiple Agents...")

                          .Value(Model.USER_ID)

                          .DataTextField("UserName")

                          .DataValueField("UserID")

                          .HtmlAttributes(new { required = "required",
validationMessage = "Please select some
Agents" })

                          .Events(events => events.Change("agentChange"))

                          .DataSource(source
=>

                          {

                              source.Read(read
=>

                              {

                                  read.Action("GetAgentAndServer", "DropdownMenus", new { area = "Shared" })

                                      .Data("filterServers");

                              })

                                 
.ServerFiltering(true);

                          })

                          .AutoBind(false)

                          .Enable(false)

                          )

                    <input type="hidden" name="serverUsersCache" id="serverUsersCache"  />

                </span>

function onServerChange(e) {

 

        var lineMultiSelect = $('#AgentID').data('kendoMultiSelect');

        lineMultiSelect.enable(true);

        lineMultiSelect.dataSource.read();

    };

function filterServers() {

        return {

            Servers: $("#ServerID").val()

        };

    }

7 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 15 May 2015, 08:01 AM

Hello Andrew,

I have tried to reproduce the issue in a runnable sample, but to no avail. Can you please check it out and let me know what I missed?

http://dojo.telerik.com/IJohu

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 18 May 2015, 02:02 PM

Yes you are missing the point entirely... You have completely changed the functionality of your MultiSelect combo box and broken a cascading workflow functionality that we relied upon for a product that we shipped.

2014 release - this is what i need cascading multiselect which retains it's previous selection, I've been using this in product for over a year

http://dojo.telerik.com/oyeZU

2015 release - I consider this functionality very broken

http://dojo.telerik.com/AnUSu

0
Kiril Nikolov
Telerik team
answered on 20 May 2015, 08:00 AM

Hello Andrew,

This is relatively easy problem to fix. Note that the dataItem method will accept both and index and jQuery element. So instead of passing the index you can use the jQuery element, part of the events object. So change:

var dataItem = this.dataItem(e.item.index());

to

var dataItem = this.dataItem(e.item);

And let me know if it helps.

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 20 May 2015, 12:19 PM
No that didn't help at all. It took 3 seconds to check in the Kendo UI Dojo links I sent you. Do you understand my question?
0
Kiril Nikolov
Telerik team
answered on 21 May 2015, 08:41 AM

Hello Andrew,

I am not sure that I understand the issue. Please check this screencast and let me know what is wrong in the cascading behavior:

http://screencast.com/t/kwMVSYRs4F

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 21 May 2015, 12:46 PM
The issue is this go to http://dojo.telerik.com/oyeZU  select oracle select 2 users now select mysql and select 2 users, you'll have 4 users in the Multi select. Now got to http://dojo.telerik.com/AnUSu and do the same thing, you'll only have 2 users in the multiselect, the read now clears the multiselect.
0
Kiril Nikolov
Telerik team
answered on 25 May 2015, 07:06 AM

Hello Andrew,

 

What you used was a malfunction in the Kendo UI MutliSelect, the problem is that the values that are set on the widget, are not present in the dataSource. There is a method that you can use to still keep the old behavior, however I would suggest you if possible to change the way multiselects are handled. Here is the example that behaves like your old example with the latest version:

 

http://dojo.telerik.com/AnUSu/6

 

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
MultiSelect
Asked by
Andrew
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or