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

When you remove an item it also removes from local data collection???

6 Answers 51 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 06 Nov 2013, 08:39 PM
It appears that when removing an item from the multiselect box (by clicking on the "x") it not only removes it from the selected values, but also from the local data collection...

So this is the chain of events...
1.) datasource brings down a list of 10 items to local data collection on page load
2.) User selects 3 items
3.) User removes 1 item of the 3 that were selected.
4.) There is now only 9 items in the local data collection

So, how do I get that last item (the removed item) to stay in the local data collection so the user can select it again if they want. 

6 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 07 Nov 2013, 01:18 PM
Hello Jason,

 
I tried to reproduce the depicted issue, but to no avail. Here is the test jsBin page. Could you modify it in order to replicate the problem?

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Albert
Top achievements
Rank 1
answered on 20 Feb 2014, 02:13 AM
Hi Georgi,

I'm having an issue similar to this but the reproduction steps are different.  It only occurs when the user clicks the multiselect and uses the keyboard to partially filter the drop down list of items.  After an item has been selected the datasource seems to get modified by the multiselect control to now only contain those items that were shown with the partial filter.  Using the test jsBin you created in the above post try doing the following:

1. Click the multiselect to show the drop down list of items and gain keyboard focus.
2. Type the letter 'a' to filter the drop down list to only show items beginning with 'a'.
3. Press the <enter> key on the keyboard to select the first highlighted item or use the mouse to select one of the items.

The datasource has now been reduced to the items that were shown when filtered (in this case 4 items).  This can be seen in the 'view length' label below the multiselect in the jsBin test.

This has been really annoying since the datasource shouldn't be modified by using this control.
0
Georgi Krustev
Telerik team
answered on 20 Feb 2014, 03:17 PM
Hello Albert,

The MultiSelect widget, like ComboBox widget, uses Kendo DataSource to filter the data. They will clear the applied filter on subsequent popup open. If this default behavior is not suitable for you, then you can clear applied filter on select.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Albert
Top achievements
Rank 1
answered on 21 Feb 2014, 12:16 AM
Hi Georgi,

Thanks for the explanation and work around.  I still think there might be a glitch in the behavior as the DataSource doesn't seem to be getting it's filter reset automatically when the popup opens.  Your first example demonstrates that although subsequent popups show a list that is no longer filtered by what was previously typed, the DataSource behind the scenes still is.

I've opted to reset the DataSource filter when I destroy the MultiSelect widget upon closing the Kendo UI Window containing it.  That way the next time the window is displayed with the MultiSelect widget using the DataSource again it wont show a restricted list.

Cheers,
Albert
0
Jianjing
Top achievements
Rank 1
answered on 10 Mar 2014, 04:39 PM
Hi,

I used the multiselect example but the drop down select list is not showing up.  Do you know why?

Regards,

-JianJing
0
Georgi Krustev
Telerik team
answered on 11 Mar 2014, 11:50 AM
Hello JianJing,

We could not determine whey the multiselect does not function correctly based on the given information. I would suggest you open another forum/support thread with more information (a widget declaration or runnable test project) about the multiselect, because the problem is not related to the discussed in this one.

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
Albert
Top achievements
Rank 1
Jianjing
Top achievements
Rank 1
Share this question
or