drag & drop to another FileExplorer

7 posts, 0 answers
  1. Robert
    Robert avatar
    16 posts
    Member since:
    Feb 2016

    Posted 15 Mar Link to this post

    Hi,

    I have working one FileExplorer with database as content provider and drag&drop works fine within this control

    but I need to be able to copy or drag& drop to second FileExplorer also. How to configure

    UploadPath etc to make it work?  Assuming that second FileExplorer will have separate db table

    for files list. Currently first FileExplorer has all Path set to "Root".

    thanks

  2. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 18 Mar Link to this post

    Hi Robert,

    I am afraid that the desired functionality is not available with the current implementation of FileExplorer as the drag-to-copy functionality of the control is highly relating on the permissions it has to the target items. Even if you implement your custom drag-and-drop logic from the grid of the one control to the others, such a scenario could be possible only if the two FileExplorer controls shares one and the same data (in order to have rights to access each others content).

    Regards,
    Vessy
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robert
    Robert avatar
    16 posts
    Member since:
    Feb 2016

    Posted 18 Mar Link to this post

    not sure if I understand, when I tested drag and drop from one fileExplorer to the other with standard  binding

    to files on the disk it does worked. I just set uploadpath on the first one as a path of the second one viewpath

    and it worked fine. Like below.   What I'm asking now can this work when I have custom content provider to database,

    each file explorer pointing to separate tablein DB like :  

    RadFileExplorer2.Configuration.ViewPaths = new string[] { "Files"};
    RadFileExplorer2.Configuration.UploadPaths = new string[] { "Bookmarks"};

    As you can see below RadFileExplorer1 pointing to /Files and RadFileExplorer2

    poiinting to /Bookmarks folder. Drag&drop as well as copy works fine.

    Why the same with database would not work?

     

     <div id="nav">
                     <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" OnClientItemSelected="OnClientItemSelected" EnableCopy="True" Skin="Outlook" DisplayUpFolderItem="True" EnableFilterTextBox="True" ExplorerMode="FileTree" RenderMode="Native">
                        <Configuration SearchPatterns="*.*" DeletePaths="~/Bookmarks" UploadPaths="~/Bookmarks" ViewPaths="~/Bookmarks"></Configuration>
                    </telerik:RadFileExplorer>
         
                </div>
              <div id="section">
                    <telerik:RadFileExplorer runat="server" ID="RadFileExplorer2" EnableCopy="True" Skin="Outlook" DisplayUpFolderItem="True" EnableFilterTextBox="True" RenderMode="Native" 
                         EnableCreateNewFolder="False" PageSize="5" EnableAsyncUpload="False">
                        <Configuration SearchPatterns="*.*" DeletePaths="~/Files" UploadPaths="~/Bookmarks" ViewPaths="~/Files" ></Configuration>
                    </telerik:RadFileExplorer>
                </div>

  5. Robert
    Robert avatar
    16 posts
    Member since:
    Feb 2016

    Posted 18 Mar in reply to Robert Link to this post

    I have simplified yet this by putting all data to the same table, so no permission issues

    but somehow drag&drop event is not triggered from one to second fileexplorer...

    why?

  6. Robert
    Robert avatar
    16 posts
    Member since:
    Feb 2016

    Posted 21 Mar in reply to Robert Link to this post

    trying to make work something like this:

            RadFileExplorer2.Configuration.UploadPaths = new string[] { "Root/Bookmarks" };
            RadFileExplorer2.Configuration.UploadPaths = new string[] { "Root/Files" };

            RadFileExplorer1.Configuration.ViewPaths = new string[] { "Root/Bookmarks"};
            RadFileExplorer1.Configuration.UploadPaths = new string[] { "Root/Bookmarks" };

     

    I put in one db table entries for Bookmaks and Files under the root, somehow move event is not triggered 

    when dragging file from fileexplorer2 to fileexplorer1, any tips?

  7. Robert
    Robert avatar
    16 posts
    Member since:
    Feb 2016

    Posted 21 Mar in reply to Robert Link to this post

    OK, I didn't notice it does actually drag and drop moving file from fileexplorer2 to fileexpelorer1 but when dropped into tree pane, not grid....Any idea why dropping into grid doesn't trigger move event?  Looks I am close. 
  8. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 23 Mar Link to this post

    Hi Rober,

    By design the moving of files/folders in FileExplorer is possible only by dragging an item from the Grid to the TreeView (thus the move event is not triggered). Furthermore the move functionality is available only in the folders with write permissions (Delete and Upload).

    Regards,
    Vessy
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017