Validation problems with form inside Window

2 posts, 0 answers
  1. AspenSquare
    AspenSquare avatar
    60 posts
    Member since:
    Jan 2012

    Posted 07 May 2013 Link to this post

    I have a kendo grid with a custom toolbar template that has a button to open a kendo window.

    This is the code I use to open my window when the above mentioned button is clicked:
    var openAssetEditor = function (e) {
                var window = $('#AssetEditorPopUp').data("kendoWindow");
                    height: 450
                    url: "/Asset/AssetPopup",
                    data: { assetId: 0 }

    Right below the grid I have my Window:

              .Title("Asset Editor")
              .Content("loading asset info...")

    My controller for the Popup window:

    public ActionResult AssetPopup([DataSourceRequest] DataSourceRequest request, int? assetId)
                return PartialView("~/Views/Asset/AssetPopup.cshtml");

    I can't seem to validate the form. I always get back that the form is valid even if all the fields are left blank.

  2. Daniel
    Daniel avatar
    2177 posts

    Posted 09 May 2013 Link to this post

    Hello Eric,

    If you are using the jQuery validation then you should use the jQuery.validator.unobtrusive.parse method in the Window refresh event after the content has been loaded:

    function refresh(e) {
    If you are using the Kendo Validator then you should initialize it on the form. 

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top