Kendo Upload is not working with Kendo Window

2 posts, 0 answers
  1. jalpesh.vadgama
    jalpesh.vadgama avatar
    7 posts
    Member since:
    Jul 2007

    Posted 17 Jun 2013 Link to this post

    Hi,


    I want to use Kendo upload into kendow window, but I am getting issue while uploading it. Below code for kendo upload in page.


    ISSUE : I am getting multiple times response in "onSuccessWnd" function and also in my controller. So that same image will display multiple times. Please me solution for same.

    It is working perfectly without window.


    /********************** image.cshtml page  *********************/

    @(Html.Kendo().Upload()
                      .Name("attachments")
                      .HtmlAttributes(new { id = "FilesToUploadWnd", style = "width:100%" })
                      .Messages(m => m.Select("select files from your computer… "))
                      .ShowFileList(false)
                      .Async(async => async
                                .Save("SaveWnd", "Log")
                            )
                      .Events(e => e
                                .Success("onSuccessWnd")
                              )
     
                    )


    /********************** javascript function  *********************/

    function onSuccessWnd(e) {
     
            var url = "../FolderName/" + e.response.status.toString();
     
            var elem = document.createElement("img");
     
            elem.setAttribute("height", "70");
            elem.setAttribute("width", "70");
             
            elem.setAttribute("src", url);
     
            document.getElementById(appendID).appendChild(elem);
      
    }
    Please let know if any body have a solution for that.
  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 19 Jun 2013 Link to this post

    Hello,

    Could you try to update the version you are using to the latest official one? There was a problem with the widgets multiple initialization when used in the Window content in older version that could cause this behavior.

    Regards,
    Daniel
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top