Greetings,
in my asp.net mvc application I have a listbox rendered as follows:
<%= Html.ListBox("localization", (Model as SeekWeb.Models.CreateMessageViewModel).Localizations.AsEnumerable())%>
is there any way to have checkbox for each listbox item? if checkbox is checked then the appropriate listbox item is selected.
I use a funky little jQuery plugin - jQuery Multiselect - to turn listboxes into more user friendly checkboxes. It's themeroller ready too!
Yeah, it does rely on the user having JS enabled but it does degrade gracefully to the standard listbox.
HTHs,
Charles
Checkboxes aren't part of the standard listbox. If you need checkboxes you'll probably need to use a grid of some kind. MVCContrib has a grid control that's pretty good.