This is my asp.net code for dropdown: iam unable get the multiple selected ids of checkboxes.
@if (ViewBag.EventContentTypeId == Convert.ToInt32(EventContentType.Events))
{
<div class="col-sm-3 form-group input" style="padding-left:0">
<div class="input-group">
@Html.DropDownList("EventCategoryDDL", @ViewBag.EventCategories as IEnumerable<SelectListItem>, new { @class = "form-control call-checkbox", @multiple = "multiple" })
<span class="input-group-addon">
<i class="fa fa-file-text" aria-hidden="true"></i>
</span>
</div>
</div>
}
and this is my datatable code:
$('#btnSearch').click(function () {
oTable
.columns(12).search($("#EventCategoryDDL option:selected").val())
.draw();
return false;
});
here in this line
.columns(12).search($("#EventCategoryDDL option:selected").val())
if selected multiple checkbox ids also i am getting only one id . and iam using jquery multiselect plugin.
$('#EventCategoryDDL').multiselect({
placeholder: '-- Select Category --',
selectAll: true
});
and this is small multiselect code of plugin.