Skip to Content

Multi Select in a Dropdown / Combo Box ?

Hi All

How to make the the dropdown or combo box allow multi select? Dropdown options are added into a list and it has ''multi select" option set to true..

new sap.ui.commons.DropdownBox(
  {
  required:true,
  id:'idPartsComboBox',
  layoutData:twoSpanLayout.clone(),
  listBox: new sap.ui.commons.ListBox({
  allowMultiSelect:true,
  items:[ 
           new sap.ui.core.ListItem({text:'Airbags'}),
           new sap.ui.core.ListItem({text:'Battery'})  
  ],
  })
  }),

Is there way to make multi select in DD?

Appreciate your help.

Regards

Sandip

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 17, 2014 at 09:48 PM

    Hi Sandip,

    I think allowMultiSelect is a property of sap.ui.commons.ListBox (SAPUI5 SDK - Demo Kit). This property works with ListBox:

    JS Bin - Collaborative JavaScript Debugging

    I've tried set a custom listBox on created dropdownBox without success:

    JS Bin - Collaborative JavaScript Debugging

    Could you work with ListBox or you need DropdownBox for some special purpose?

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded

    • Hey Angel

      Thanks for your time. Yes, to me allowMulti looks like a property for List box only.. Even I couldnt get it to work after adding it to a dropdown..

      Wanted the DD for specific purpose, probably will have to live with ListBox as of now.

      Thanks,

      Sandip