Multi select clears on read with version 2015.1.408

8 posts, 0 answers
  1. Andrew
    Andrew avatar
    15 posts
    Member since:
    Feb 2013

    Posted 13 May 2015 Link to this post

    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()

            };

        }
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 15 May 2015 Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Andrew
    Andrew avatar
    15 posts
    Member since:
    Feb 2013

    Posted 18 May 2015 Link to this post

    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

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 20 May 2015 Link to this post

    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
  6. Andrew
    Andrew avatar
    15 posts
    Member since:
    Feb 2013

    Posted 20 May 2015 Link to this post

    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?
  7. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 21 May 2015 Link to this post

    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
  8. Andrew
    Andrew avatar
    15 posts
    Member since:
    Feb 2013

    Posted 21 May 2015 Link to this post

    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.
  9. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 25 May 2015 Link to this post

    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
Back to Top
UI for ASP.NET MVC is VS 2017 Ready