I'm trying to get a list box using multiselect in BS5
while running the code the button is not working
if i check in inspect the data is perfectly falling inside it but don't know what the problem is
What I have tried:
<div class="col-sm-3">
<div class="form-group">
@Html.Label("Customer ID", new { @class = "col-md-4 form-control-label" })
<select name="ddl_CustID" id="ddl_CustID" class="form-control" multiple></select>
@*@Html.ListBoxFor(model => model.fld_cust_id, new SelectList("", "Value", "Text"), new { @id = "ddl_CustID", @class = "form-control" })*@
</div>
</div>
$.ajax({
type: "GET",
url: '@Url.Action("GetProvCommReport", "Report")',
contentType: 'application/json',
dataType: "json",
error: function () {
var notify = $.notify('Error Error for reading location info. Please contact administrator.!', {
allow_dismiss: true,
type: 'danger'
});
return false;
},
success: function (d, status) {
if (status == 'success') {
var options = "";
var duplicate = [];
$.each(d, function (k, v) {
options += "<option value='" + v["fld_cust_id"] + "'>" + v["fld_cust_id"] + "</option>";
console.log(v["fld_cust_id"]);
duplicate.push(v["fld_cust_id"]);
});
console.log(options);
$('#ddl_CustID').append(options);
$('#ddl_CustID').multiselect({ includeSelectAllOption: true, buttonWidth: '300px', selectAllValue: 0, enableFiltering: true, maxHeight: 350, dropRight: false, enableCaseInsensitiveFiltering: true });
$('#ddl_CustID').multiselect('refresh')
$('#ddl_CustID').multiselect({
allselectedtext: 'all',
multiple: true,
numberdisplayed: 8,
buttonwidth: '100%',
includeselectalloption: true,
enablefiltering: true,
maxheight: 150,
enablecaseinsensitivefiltering: true,
nonSelectedText: 'Select Customer ID',
});
} else {
var notify = $.notify('Error Error for reading location info. Please contact administrator.!', {
allow_dismiss: true,
type: 'danger'
});
return false;
}
}
});