Drag and Drop for RadTreeView

4 posts, 0 answers
  1. JNG
    JNG avatar
    10 posts
    Member since:
    Jul 2012

    Posted 08 Sep 2015 Link to this post

    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.

     

     

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 10 Sep 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JNG
    JNG avatar
    10 posts
    Member since:
    Jul 2012

    Posted 10 Sep 2015 Link to this post

    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!

  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 11 Sep 2015 Link to this post

    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
Back to Top