cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Select in a Dropdown / Combo Box ?

SandipAgarwalla
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member182650
Contributor
0 Kudos

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

SandipAgarwalla
Active Contributor
0 Kudos

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

Answers (0)