This is a migrated thread and some comments may be shown as answers.

Nested Drop Areas Created Since Q1 2013 Release

3 Answers 30 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Korn1699
Top achievements
Rank 1
Korn1699 asked on 17 Apr 2013, 05:32 PM
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). 

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 19 Apr 2013, 07:40 AM
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!
0
Korn1699
Top achievements
Rank 1
answered on 19 Apr 2013, 01:05 PM
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. 
0
T. Tsonev
Telerik team
answered on 23 Apr 2013, 11:40 AM
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!
Tags
Upload
Asked by
Korn1699
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Korn1699
Top achievements
Rank 1
Share this question
or