Dropdownlist with checkbox

Asked

Viewed 302 times

2

Would anyone know a way to make one DropdownList with checkbox?

I have the following Dropdownlist:

@Html.DropDownListFor(model => model.CD_AFFILIATE, new SelectList(@ViewBag.list, "CD_AFFILIATE","NM_AFFILIATE"),  new { @class = "ComboWidth" })

The best way would be to do with jQuery or make a custom component?

1 answer

1

Hello, Paulo.

The Dropdownlist helper generates an element <select> standard. To dropdown with checkboxes you will have to customize the default component by inserting a checkbox into each .

Take a look at the component Selectmenu of jQuery UI, maybe it’ll help you.

Hug.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.