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

drag & drop to another FileExplorer

6 Answers 104 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 16 Mar 2016, 03:19 AM

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

6 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 18 Mar 2016, 05:29 PM
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.
0
Robert
Top achievements
Rank 1
answered on 18 Mar 2016, 06:47 PM

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>

0
Robert
Top achievements
Rank 1
answered on 19 Mar 2016, 03:26 AM

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?

0
Robert
Top achievements
Rank 1
answered on 22 Mar 2016, 12:19 AM

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?

0
Robert
Top achievements
Rank 1
answered on 22 Mar 2016, 12:56 AM
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. 
0
Vessy
Telerik team
answered on 23 Mar 2016, 04:17 PM
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.
Tags
FileExplorer
Asked by
Robert
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Robert
Top achievements
Rank 1
Share this question
or