8
Reply

Problem dropdown with checkbox by bootstrap multiselect

Mani Kandan

Mani Kandan

Mar 24 2017 4:07 AM
1.8k
I am working on MVC 5, there is have
  1. @Html.DropDownListFor(model => model.ShowAdConfigIDs, ViewData["Services"] as List<SelectListItem>, "Select", new { @id = "DDLServiceCate", @class = "form-control " }) 
 I want to do bootstrap multiselect dropdown with checkbox. For, I have tried:
  1. <script src="~/Scripts/bootstrap-multiselect.js"></script>  
  2. <link href="~/css/bootstrap-multiselect.css" rel="stylesheet" />  
  3.   
  4. <script type="text/javascript">  
  5.     $(function () {  
  6.         $('[id*=DDLServiceCate]').multiselect({  
  7.             includeSelectAllOption: true  
  8.         });  
  9.     });  
  10. </script> 
 But after implementing this, look like below image.
 
 

But actually I want look like below image showing.

 

How can I do this ?

Please help me...

Answers (8)