Hi, I'm having a problem on rendering my listbox every time I call my modal.
Please see the attached file.
here's my code:
<div class="modal fade" id="assign-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document" style="max-width:790px!important;"> <div class="modal-content"> <div class="modal-header" style="display:block"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">t</h4> </div> <div class="modal-body"> <input type='text' id='searchBox' class='k-textbox' placeholder='Search' /> <div id="example" role="application"> <div class="demo-section k-content"> <div> <label for="optional" id="agents">FROM</label> <label for="selected">TO</label> <br /> <select id="unoptional"></select> <select id="unselected"></select> </div> </div> </div> </div> <div class="modal-footer"> <button id="SaveEdit" type="button" data-save class="btn btn-primary">Assign</button> <button type="button" class="btn btn-default" data-cancel>Cancel</button> </div> </div> </div></div>
$("#optional").kendoListBox({ connectWith: "selected", dataTextField: "FullName", dataValueField: "FullName", selectable: "multiple", toolbar: { tools: ["transferTo", "transferFrom", "transferAllTo", "transferAllFrom"] }, dataSource: { serverPaging: true, transport: { read: { url: myUrl, dataType: "json" }, schema: { model: { fields: { FullName: { type: "string" }, Id: { type: "string" } } } } } } }); $("#selected").kendoListBox({ dataTextField: "FullName", dataValueField: "FullName", selectable: "multiple", });
