I use
@(Html.Kendo().DropDownList()
.Name("size")
.BindTo(new List<string>() {
"S - 6 3/4\"",
"M - 7 1/4\"",
"L - 7 1/8\"",
"XL - 7 5/8\""
})
.HtmlAttributes(new { style = "width: 100%" })
)
on Index page and it working
The same I use in dialog but unsuccesfully
Code of dialog:
<div id="popup_assignAnOrder" style="display: none; z-index: 10; background-color: white; position: absolute; left: 0; top: 0; width: 100%; height: 100%"></div>
<script>
function click_assignAnOrder() {
var grid = $("#grid").data("kendoGrid");
var data = {
selectedIds: Object.keys(grid._selectedIds)
};
$.ajax({
type: "post",
url: "/Grid/PopupAsignPrikazi",
data: data,
success: function (data) {
var dialog = document.getElementById("popup_assignAnOrder");
dialog.innerHTML = data;
$(dialog).show('fast');
action
[HttpPost]
public ActionResult PopupAsignPrikazi(string[] selectedIds)
{
ViewBag.Tip = _db.Prikazs.Select(p => new SelectListItem(){ Value = p.Tipp.Kod_tipp.ToString(), Text = p.Tipp.Tipp1 }).Distinct().ToList();
ViewBag.Osnovanie = _db.Prikazs.Select(p => p.Osnovanie).Distinct().ToList();
ViewBag.SelectedIds = selectedIds.Select(Int32.Parse);
return PartialView("~/Views/Home/_PopupAddPrikazi.cshtml");
}