Is it possible to use razor syntax to add kendo widgets inside of the Content of a Kendo Window?
Here is an example of what I am trying to do but the kendo widgets aren't loading properly:
<div id="window1"></div>
@(Html.Kendo().Window()
.Name("productWindow")
.Title("Additional Settings")
.Width(400)
.Modal(true)
.AppendTo("#window1")
.Visible(false)
.Actions(actions => actions.Minimize().Maximize().Close())
.Content(@<text>
<label asp-for="ProductId"></label>
@(Html.Kendo().DropDownList()
.Name("ProductId")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "Prod 1",
Value = "1"
},
new SelectListItem() {
Text = "Prod 2",
Value = "2"
},
new SelectListItem() {
Text = "Prod 3",
Value = "3"
},
new SelectListItem() {
Text = "Prod 4",
Value = "4"
}
})
.Value("2")
.HtmlAttributes(new { style = "width: 100%" })
.Deferred()
)
<span asp-validation-for="ProductId" class="text-danger"></span>
</text>)
.Deferred()
)
You can have the window make another call to ask for it's content. That call will return the partial with the view for the window.
In Parent View
Controller
Window Detail PartialView
And have the controller return a View() or PartialView().