Abhilash J A

Abhilash J A

  • 530
  • 2.4k
  • 600.4k

Problem dropdown with checkbox by bootstrap multiselect

Mar 24 2017 4:07 AM
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 (10)