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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.