1
I’m having a problem when I call my Partialview, it loads all the data in the View but not in the right format (layout) of Select2, in case when clicking the input appears the data, is currently loading all on the screen.
Ex of a View I use and load Select2.
I think it’s something css, but I’m referencing both of select2 but it’s still not working.
<link rel="stylesheet" href="~/Content/separate/vendor/select2.min.css">
<link rel="stylesheet" href="~/Content/separate/vendor/blockui.min.css">
<script type="text/javascript" src="~/Scripts/lib/blockUI/jquery.blockUI.js"></script>
<div class="col-lg-1">
<div class="input-group">
<label>Contrato:</label>
@Html.DropDownList("contrato", null, htmlAttributes: new { @class = "select2", @multiple = "multiple" })
</div>
</div>
<script src="~/Scripts/lib/select2/select2.full.min.js"></script>
The call of Partial:
function addCliente() {
var data = $("Form").serializeArray();
$.post("/EmailMarketing/AddCliente", data, function (ret) {
$("#addClienteBody").html(ret);
});
$('#modalAddCliente').modal('show');
}
How do you make the call from
PartialView
?– Barbetta
Added the question.
– Adriano Praia