Nested Drop Areas Created Since Q1 2013 Release

4 posts, 0 answers
  1. Korn1699
    Korn1699 avatar
    33 posts
    Member since:
    Apr 2007

    Posted 17 Apr 2013 Link to this post

    Whenever I have a partial postback and refresh the upload control, I get a drop area that gets nested inside the most nested drop area.  Each postback just nests it one more.  As far as I can tell, this has just been since Q1 2013.  It is causing the height of the control to increase with each postback and pushing content down.  I've noticed this with IE 10, Chrome 28, and Firefox 20.  I saw the notice about 1.9.1, and I still get this issue with the internal build from yesterday (4/16). 
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 19 Apr 2013 Link to this post

    Hi,

    The Upload, and Kendo UI widgets in general, do not support initialization over an existing widget. The original DOM structure is not restored and side effects are almost guaranteed.

    Our recommendation is to clean-up the old widget using kendo.destroy and create the source markup before each initialization. For example:

    <div id="container">
        <input id="upload" type="file" />
      </div>
      <script>
        $(function() {
          var container = $("#container");
          $("#upload").kendoUpload({ async: { saveUrl: "/" } });  
          
          kendo.destroy(container);
          container.html("<input id=\"upload\" type=\"file\" />");      
          $("#upload").kendoUpload({ async: { saveUrl: "/" } });
        });
    </script>


    (Live demo on jsBin)

    I hope this helps.

    Kind regards,

    Tsvetomir Tsonev
    the Telerik team
    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
  4. Korn1699
    Korn1699 avatar
    33 posts
    Member since:
    Apr 2007

    Posted 19 Apr 2013 Link to this post

    That solution seems to work about half the time... 

    We are using the RadAjaxManager and re-running the initialization code after postbacks, since they don't work well with other controls.  It worked fine until the Q1 release though, which is causing the drop areas to get nested on postback, instead of it just initializing them again. 
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 23 Apr 2013 Link to this post

    Hi,

    I'm not sure how this is going to play with the RadAjaxManager. My recommendation is to move the initialization code for Kendo widgets outside of dynamically updated zones.

    If this is not an option then perhaps you can share a sample page so we can debug it?

    Kind regards,
    Tsvetomir Tsonev
    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
Kendo UI is VS 2017 Ready