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

Drag and Drop for RadTreeView

3 Answers 92 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
JNG
Top achievements
Rank 1
JNG asked on 08 Sep 2015, 02:13 PM

I need to have a drop zone for each node of a RadTreeView.  I have added a RadAsyncUpload control in the NodeTemplate section.  Are there any examples/demos for this scenario?

I followed the current demo structure. But in my case, the files are getting dropped for every upload control and not the specific one.

 

 

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 10 Sep 2015, 10:58 AM
Hi,

Every RadAsyncUpload has its own drop zone, so you can drop files directly into the upload control.

<telerik:RadTreeView runat="server" ID="tree">
             <Nodes>
                 <telerik:RadTreeNode>
                     <NodeTemplate>
                         Root Node 1
                         <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"></telerik:RadAsyncUpload>
                     </NodeTemplate>
                 </telerik:RadTreeNode>
                 <telerik:RadTreeNode>
                     <NodeTemplate>
                         Root Node 2
                         <telerik:RadAsyncUpload ID="RadAsyncUpload2" runat="server"></telerik:RadAsyncUpload>
                     </NodeTemplate>
                     <Nodes>
                         <telerik:RadTreeNode>
                             <NodeTemplate>
                                 Child Node 1
                                 <telerik:RadAsyncUpload ID="RadAsyncUpload2" runat="server"></telerik:RadAsyncUpload>
                             </NodeTemplate>
                         </telerik:RadTreeNode>
                     </Nodes>
                 </telerik:RadTreeNode>
             </Nodes>
         </telerik:RadTreeView>

Just have in mind that drag and drop functionality is not supported by the older browsers.

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
JNG
Top achievements
Rank 1
answered on 10 Sep 2015, 02:21 PM

That seems to have worked. 

Now I cannot seem to change the style of the Drag/Drop box.  What is the CSS class that controls the style of the drag box?

 Thanks!

0
Hristo Valyavicharski
Telerik team
answered on 11 Sep 2015, 05:52 AM
This should work for the default skin:

<style>
       html .RadUpload_Default .ruDropZone,
       html .RadUpload_Default_rtl .ruDropZone {
           border-color:red;
           background-color:yellow;
           color:green;
       }
   </style>

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
JNG
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
JNG
Top achievements
Rank 1
Share this question
or