I am struggling for populate the MultiSelect Dropdown list by Twitter Bootstrap library in MVC. I am getting the List of data on items in JSON string format. And passing to JSON.parse($('#RetailerSelectItems').val())
but list is not enable in web page. the code as below
Inside report.js
function BinddetailsEvents() {
//Populate Retailer Dropdown
var MAWBSelectItems = JSON.parse($('#MAWBSelectItems').val()); // MAWBSelectItems List of data
var MAWBDropDown = $('#MAWBDropDown');
$(MAWBDropDown).data('allselected', true);
MultiSelectInit(MAWBDropDown);
$(MAWBDropDown).multiselect('dataprovider', MAWBSelectItems);
}
Inside report.cshtml
{
<div>
<label>MAWB</label><br />
<select id="MAWBDropDown" multiple="multiple" style="display: none" data-allselected="true"></select>
</div>
}