Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Multiple selection selects wrong
posted

Hi,

i'm using the WebDropDown with multiple selection enabled. As example I refer to the online sample WebDropDown - Multi Selection. As shown in the example, I have a long list of selectable items in the WebDropDown, beginning with an empty selection. The user can start typing to filter the list and check some of them, but the Controls SelectedItems collections contains more items as it actually displays as selected by checkbox.

Try the following to reproduce what I mean:

  • Run the example
  • Clear out the topmost webdropdown named 'Checkbox multiple selection'
  • Type "B" in the textbox to filter the list. The control will complete to Berglunds snabbköp. Do not select this item by clicking the checkbox!
  • Mark the checkbox item 'Bólido comidas preparadas' as selected
  • Close the dropdown list

The event log outputs this:

Interact with the control to see what events are activated 
1. Selection changing(WebDropDown_Checkbox): old items = [ ] ; new items = [ 0, ]; 
2. Selection changed(WebDropDown_Checkbox): old items = [ ] ; new items = [ 0, ]; 
3. Selection changing(WebDropDown_Checkbox): old items = [ 0, ] ; new items = [ 4, ]; 
4. Selection changed(WebDropDown_Checkbox): old items = [ 0, ] ; new items = [ 4, ]; 
5. Selection changing(WebDropDown_Checkbox): old items = [ 4, ] ; new items = [ 4, 7, ]; 
6. Selection changed(WebDropDown_Checkbox): old items = [ 4, ] ; new items = [ 4, 7, ]; 
As you can see there is only one item checked, but TWO items are selected? I actually need a way select only those items the user checks by checkbox.
What am I doing wrong?
Parents
  • 24671
    Suggested Answer
    posted

    Hi,

    Thanks for your feedback. This is already fixed in the latest Service release.

    The issue is that when an item is selected in that case, through a filtering request, the checkbox itself is not marked as checked  - but the item is still selected both visually and in the data model. I.e. the log shows the correct results, only the checkbox (visually) is not checked. Using get_selected() or set_selected() from the API also returns correct results. With the fix also the checkbox state is updated every time. 

    Thanks,

    Angel 

Reply Children