Welcome Guest Search | Active Topics | Sign In | Register

Need multiple selection in dropdownlist Options
Divya
Posted: Wednesday, October 3, 2012 10:10:12 AM
Rank: Newbie
Groups: Member

Joined: 9/13/2012
Posts: 2
Hi,

I need to select multiple items from the dropdownlist and I found a solution in the below link:
http://www.essentialobjects.com/doc/1/combobox/dropdown.aspx

I tried using the below code:

<eo:ComboBox runat="server" ID="CombBox1" ControlSkinID="None" DefaultIcon="phone.gif"
HintText="Select a phone" Width="150px">
<TextStyle CssText="font-family: tahoma; font-size: 11px;" />
<IconStyle CssText="width:16px;height:16px;" />
<IconAreaStyle CssText="font-family: tahoma; font-size: 11px; background-image:url(00107007); background-position: left left; background-repeat:no-repeat; vertical-align:middle;padding-left:2px; padding-right:2px;" />
<DropDownTemplate>
<div style="border: solid 1px #c0c0c0; background-color: White; padding: 3px;" class="normal">
<table border="0">
<tr>
<td valign="top">
<eo:ListBox runat="server" ID="ListBox1" ControlSkinID="None" Height="200px" Width="200px" AllowMultiSelect="true" MultiSelectModifier="Shift">
<FooterStyle CssText="background-image:url('00106002'); background-position: left top; background-repeat: repeat; height:16px;padding-bottom:2px;padding-left:7px;padding-right:2px;padding-top:2px; margin-top:3px; height: 18px;" />
<BodyStyle CssText="border: solid 1px #dedede;" />
<ItemListStyle CssText="padding: 4px;" />
<DisabledItemStyle CssText="border-bottom: solid 1px #dedede; color: #c0c0c0; padding: 2px; padding-left:2px; padding-top:4px;padding-right:2px;padding-bottom:4px;" />
<ItemStyle CssText="border-bottom: solid 1px #dedede; padding-left: 2px; padding-right:2px; padding-top:4px; padding-bottom: 3px; background-color:white;" />
<ListBoxStyle CssText="font-family: Tahoma; font-size:12px;background-color:white;" />
<SelectedItemStyle CssText="background-color: #08246b; color:white; padding-left:2px; padding-top:4px;padding-right:2px;padding-bottom:4px;" />
<MoreItemsMessageStyle CssText="padding:2px;" />
<HeaderStyle CssText="background-image:url('00106001');background-position-x:left;background-position-y:top;background-repeat:repeat;height:16px;padding-bottom:2px;padding-left:7px;padding-right:2px;padding-top:6px;height:19px;margin-bottom:3px;" />
<Items>
<eo:ListBoxItem Text="Item 1" />
<eo:ListBoxItem Text="Item 2" />
<eo:ListBoxItem Text="Item 3" />
<eo:ListBoxItem Text="Item 4" />
<eo:ListBoxItem Text="Item 5" />
<eo:ListBoxItem Text="Item 6" />
<eo:ListBoxItem Text="Item 7" />
</Items>
<ItemHoverStyle CssText="border-bottom: solid 1px #dedede; padding-left: 2px; padding-right:2px; padding-top:4px; padding-bottom: 3px; background-color:#f3f7fc;" />
</eo:ListBox>
</td>
</tr>
</table>
</div>
</DropDownTemplate>
<ButtonStyle CssText="width:17px;height:23px;" />
<ButtonAreaStyle CssText="background-image:url(00107005);" />
<ButtonAreaHoverStyle CssText="background-image:url(00107006);" />
<TextAreaStyle CssText="font-family: tahoma; font-size: 11px; border-top: solid 1px #3d7bad; border-bottom: solid 1px #b7d9ed; vertical-align:middle;padding-left:2px; padding-right:2px;" />
<HintTextStyle CssText="font-style:italic;background-color:#c0c0c0;color:white;line-height:16px;" />
</eo:ComboBox>



But, the above code allowed me to select only one item at a time, even using AllowMultiSelect="true" MultiSelectModifier="Shift"


Can you provide me a solution to select multiple items at a time from the dropdownlist.

Thanks,
Divya.

eo_support
Posted: Wednesday, October 3, 2012 1:01:48 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

I don't think you can do multi-select in a ComboBox. You can do multi-select if you use the ListBox alone. But once you use it together with a CombBox, the multi-select no longer work because the text box portion of the ComboBox only take a single item. So in order to use multi-selection, you might want to avoid using the CombBox, but just using the ListBox, or a ListBox with your own UI elements such as textbox.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.