How do get kendo window's content inside form tag?

209 views Asked by At

I have the following HTML where Address is shown using Kendo Window

<form id="myform">
    <input id="firstName" class="form-control" />
    <input id="lastName" class="form-control" />

    <button id="btnOpenWindow" type="button" class="btn btn-info">Click Me To Edit Address</button>
    @(Html.Kendo().Window()
        .Name("mywindow")
        .Title("My Window")
        .Width(400)
        .Visible(false)
        .Modal(true)
        .Content("<input id=\"address\" class=\"form-control\">")
        .Draggable(false))

    <button id="btnSubmit" type="submit" class="btn btn-info">Save</button>
</form>
<script src="~/js/test.js"></script>

test.js file

$("#btnOpenWindow").click(function () {
         $("#mywindow").getKendoWindow().open().center();
        
});

ISSUE
Even though kendo window is defined inside the form it always renders at the end of the page just before body tag, along with its content. So address does not render inside the form. So when user clicks Save, the address information does not get submitted to server.

How do get kendo window's content render inside form?

0

There are 0 answers