Listbox.Multiselect

Syntax

MultiSelect: Boolean

Description

The MultiSelect property determines whether multiple selection is available for list items.

Comments

Multiple selection is available if this property is set to True. By default this property is set to False.

Example

To execute the example, the page must contain the ListBox named listbox (see Example of Creating the ListBox Component). Enable multiple selection and add a handler for the ListBox.ItemDeselected event:

listbox.setMultiSelect(true);

listbox.ItemDeselected.add(function (sender, args)

{

    args.ListItem.setContent("deselected");

    alert(listbox.getSelectedItems());

})

After executing the example multiple list items can be selected. On deselecting a selected item, its text changes to "deselected", and a message that contains names of selected items appears on the screen.

See also:

ListBox