When Removing Selected Items, they do not return to the list in the dropdown of available items

2 posts, 0 answers
  1. Jason
    Jason avatar
    44 posts
    Member since:
    Apr 2013

    Posted 03 Jan 2014 Link to this post

    I have a multiselect that I am initializing.  All works fine except the following scenario...

    1.) Select several values from the dropdown list and they are shown as selected values and removed from the list of available options (as expected)
    2.) Remove a selected item or two by clicking on the little "x"

    At this point the selected items that have been removed (by clicking the "x") should show up back in the list from the dropdown...  They do not and that is my question... How do I get the removed selected values to show back up in the list of available items from the dropdown?

                    var asDatabaseCubeId = $("#ASDatabaseCubeId").val();
                    var dimName = $(ui.draggable).children(".rb-item-label").attr("data-dimensionname");
                    var hireName = $(ui.draggable).children(".rb-item-label").attr("data-hirearchyname");
                    var memberCount = $(ui.draggable).children(".rb-item-label").attr("data-membercount");
                    
                    // defaults
                    var serverFiltering = false;
                    var autoBind = true;
                    var minLength = 0;
                    var placeholder = "Select filter parameters...";

                    if (memberCount >= 1000) {
                        serverFiltering = true;
                        autoBind = false;
                        minLength = 3;
                        placeholder = "Enter at least 3 characters";
                    }

                    /* This initiates the actual Kendo Multiselect control */
                    $('#' + id).kendoMultiSelect({
                        dataTextField: "DisplayName",
                        dataValueField: "MemberValue",
                        placeholder: placeholder,
                        tagTemplate: $("#multiSelectTagTemplate").html(),
                        dataSource: new kendo.data.DataSource({
                            serverFiltering: serverFiltering,
                            transport: {
                                read: {
                                    url: window.rootUrl + "/Reports/DimensionMembers",
                                    dataType: "json",
                                    data: {
                                        ASDatabaseCubeId: asDatabaseCubeId,
                                        DimensionName: dimName,
                                        HirearchyName: hireName
                                    }
                                },
                                parameterMap: convertParam
                            }
                        }),
                        filter: 'contains',
                        //autoBind: autoBind,
                        minLength: minLength
                    });
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 06 Jan 2014 Link to this post

    Hello Jason,

    I prepared a simple jsBin demo based on the given setup, but the widget works as expected. Probably I am missing something and I will be glad if you can modify the issue using the given test demo.

    Regards,
    Georgi Krustev
    Telerik
    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
Back to Top