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

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

1 Answer 107 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 03 Jan 2014, 11:21 PM
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
                });

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 06 Jan 2014, 11:44 AM
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!
Tags
MultiSelect
Asked by
Jason
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or