-6

How to allow checkbox="true" for asp dropdownlist

3 Answers3

0

You can use telerik component as like the following:

  <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
                    Width="250" Label="Select book genres:">
                    <Items>
                        <telerik:RadComboBoxItem Text="Arts" />
                        <telerik:RadComboBoxItem Text="Biographies" />
                        <telerik:RadComboBoxItem Text="Children's Books" />
                        <telerik:RadComboBoxItem Text="Computers &amp; Internet" />
                        <telerik:RadComboBoxItem Text="Cooking" />
                        <telerik:RadComboBoxItem Text="History" />
                        <telerik:RadComboBoxItem Text="Fiction" />
                        <telerik:RadComboBoxItem Text="Mystery" />
                        <telerik:RadComboBoxItem Text="Nonfiction" />
                        <telerik:RadComboBoxItem Text="Romance" />
                        <telerik:RadComboBoxItem Text="Science Fiction" />
                        <telerik:RadComboBoxItem Text="Travel" />
                 </Items>
</telerik:RadComboBox>

or else you can use Converting ASP.NET Control Check Box List into Drop-Down Check Box List

sujith karivelil
  • 28,671
  • 6
  • 55
  • 88
0

You can use Multiselect for this

you need to keep multiple="multiple" for HTML like this

<div class="mid-width wrapItems">
    <select class="multiselect" multiple="multiple" name="buckHunter">
        <option value="1">Large Antelope</option>
        <option value="2">Large Antelope </option>
        <option value="3">Medium to Large Antelope </option>
        <option value="4">Small Game to Medium Game </option>
        <option value="5">N/A</option>
    </select>
</div>

Multiselect activating using Jquery can be done like this :

$('.multiselect').multiselect({ 
    enableCaseInsensitiveFiltering: true,
    maxHeight: 200,
});

So I have made this Demo in Fiddle you can check out this so that you can able to check multiple in dropdown

Krsna Kishore
  • 8,233
  • 4
  • 32
  • 48
0

to allow checkbox="true" for asp dropdownlist you can try asp:DropDownCheckBoxes tag.

<asp:DropDownCheckBoxes ID="mydropdown0" runat="server" AppendDataBoundItems="true" UseButtons="true"></asp:DropDownCheckBoxes>  
Ajay2707
  • 5,690
  • 6
  • 40
  • 58