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

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

    Posted 06 Nov 2013 Link to this post

    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. 
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 07 Nov 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Albert
    Albert avatar
    3 posts
    Member since:
    Sep 2013

    Posted 19 Feb 2014 Link to this post

    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.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 20 Feb 2014 Link to this post

    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!
  6. Albert
    Albert avatar
    3 posts
    Member since:
    Sep 2013

    Posted 20 Feb 2014 Link to this post

    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
  7. Jianjing
    Jianjing avatar
    3 posts
    Member since:
    Mar 2014

    Posted 10 Mar 2014 in reply to Georgi Krustev Link to this post

    Hi,

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

    Regards,

    -JianJing
  8. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 11 Mar 2014 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready