ASP.NET MVC Dropdown

Is it possible to create a drop-down list in ASP.NET MVC that has a checkbox next to each item in the drop-down list?

I know this sounds simple, in web forms or using telerik, it would be pretty simple, but I can’t figure out how I can implement the same thing in basic HTML.

thanks

+4
source share
2 answers

You can use the jQuery plugin called DropDownCheckList to get the desired dropdown effect with multiselect options.

alt text

Its quite simple, all you have to do is create an html list and call the jQuery plugin to expand the list.

<script type="text/javascript"> $(document).ready(function() { $("#listbox").dropdownchecklist(); } </script> <select id="listbox" multiple="multiple"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> 

http://dropdown-check-list.googlecode.com/svn/trunk/doc/dropdownchecklist.html

+6
source

drop-down list with each drop-down list item having a checkbox? that is not a standard HTML element, why do you need it? You will need several options:

http://www.htmlcodetutorial.com/forms/_SELECT_MULTIPLE.html (first)

+1
source

All Articles