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

Upload and delete buttons are disabled when using custom content provider

15 Answers 279 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 15 Jul 2016, 01:36 PM

Hi,

 

I have to customise File Explorer to save and read files from a UNC path (eg.\\ComputerName\SharedFolder\Resource) that resides on a shared folder. I am saving the file definitions on database except the content which is being saved on the above path.

I am able to achieve file save functionality with simple c# code. Selecting the file from gridview is reading the file from above path and creating a preview successfully (making use of a generic handler here). However, I can't delete this file, as the delete icon is disabled.

I can make sure that user has got full permissions on this path.

Another issue is that, when the control is loaded for the first time and there is no content in it, all the control buttons i.e upload, delete etc.. are disabled.

Can you please suggest any solution to this issue?

 

Thanks.

 

15 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 20 Jul 2016, 11:39 AM
Hi Neil,

The delete permissions of the files and folders in FileExplorer are given depending on the value set to the control's DeletePaths property. In order to be able to delete the files in a specific folder, the path to this folders has to be added to the FileExplorer's delete paths in  similar way:
protected void Page_Load(object sender, EventArgs e)
{
    RadFileExplorer1.Configuration.ViewPaths = new string[] { @"\\ComputerName\SharedFolder\Resource" };
    RadFileExplorer1.Configuration.DeletePaths = new string[] { @"\\ComputerName\SharedFolder\Resource" };
    ..
}

As for the disabled buttons on initial load of FileExplorer, this happens when RadFileExplorer cannot access the given path (either the path is wrong, or the controls does not have enough rights to access it). Can you elaborate a bit on the exact way you are configuring the control? Are you using the provided by us content provider for accessing shared paths, or do you have your own implementation for the same?

Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Neil
Top achievements
Rank 1
answered on 21 Jul 2016, 11:06 AM

Hi Vessy,

I have a custom implementation. The concept is similar to database content provider except the actual file content is not being saved to the database but to a network location. 

I have setup ViewPaths and DeletePaths to point to the remote network path. I can make sure that user has right permissions on this path. (I have further made sure by testing withFullPermissionTest() function suggested in many Telerik blogs)

Can you please elaborate "RadFileExplorer cannot access the given path" ? If CheckWritePermissions(), CheckReadPermissions() & CheckDeletePermissions() all are returning true in custom content provider, then what else can cause a problem?

Also, tree control on left hand side in file explorer doesn't refresh automatically on every upload, delete and rename. Any idea on how to refresh it?


 

 

0
Vessy
Telerik team
answered on 21 Jul 2016, 11:35 AM
Hi Neil,

By saying "RadFileExplorer cannot access the given path" I mean that the control cannot navigate to the passed path. The reasons for that can be different, e.g. wrong path format (e.g. the default provider works with virtual paths), not existing folder (or wrong path to it), etc.

Unfortunately with the current information I can only guess what you actual implementation is and what might be causing the experienced problems. Can you, please, open a primary support ticket and send us a runnable sample where the described problems can be reproduced, so we can examine them and advice you further?

Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Neil
Top achievements
Rank 1
answered on 21 Jul 2016, 11:44 AM

OK Thanks. I will upload sample soon.

Can you please answer another query?

"Tree control on left hand side in file explorer doesn't refresh automatically on every upload, delete and rename. Any idea on how to refresh it? "

0
Vessy
Telerik team
answered on 22 Jul 2016, 10:49 AM
Hi Neil,

By default the TreeView control nested in FileExplorer shows only the folder structure loaded in FileExplorer. Are you using the control in its FileTree ExplorerMode (without showing the files in the Grid)? I tested the control with the latter configuration, but the TreeView gets properly updated after a new file is uploaded. Can you verify that there are no any failing AJAX requests when you are uploading the files?

Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Neil
Top achievements
Rank 1
answered on 26 Jul 2016, 03:44 PM

I am using ExplorerMode="default". No, there are no failing AJAX requests. All operations work fine. But Treeview doesn't get updated automatically.

Issue is specific to adding/deleting folders. Grid gets refreshed automatically, but not the TreeView on LHS.

Also, there is one more weird thing. While deleting a folder, e.Command is 'DeleteFile' in following event:

RadFileExplorer1_ItemCommand(object sender, Telerik.Web.UI.RadFileExplorerEventArgs e)

However, it is expected to have a value 'DeleteDirectory'. What am I doing wrong here?

0
Vessy
Telerik team
answered on 29 Jul 2016, 01:22 PM
Hi Neil,

I am afraid that we are not aware of the described behavior and can be only guessing for the reason behind it without seeing the exact configuration that is leading to it. Please, follow the instructions from this blog post in order to isolate the problem into a runnable sample we can examine on our side, so we can help you further in resolving the case.

Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Neil
Top achievements
Rank 1
answered on 29 Jul 2016, 02:33 PM
This thread only accepts images. Please let me know how to post a zipped folder.
In the meanwhile, can you please let me know if there is any server side event that can fire refresh of file viewer for each Add/delete/update activity?
Can we do something similar from 'filebrowsercontentprovider'?
0
Neil
Top achievements
Rank 1
answered on 01 Aug 2016, 03:59 PM

Hi Telerik Team,

Gentle reminder!

Finding resolution to this issue is taking so longer. Can someone please look at it asap on priority?

0
Vessy
Telerik team
answered on 03 Aug 2016, 02:54 PM
Hi Neil,

The attaching of *.zip files is allowed only in a primary support ticket. You can open a new support ticket and provide the isolated sample in it, so we can continue the case investigation there. Once the issue is resolved you can feel free to update this forum thread with the resolution.

As for the refresh of FileExplorer, there is no way to fire the refresh f the control on the server. The only alternative I can suggest you is to clear the nodes of the Treeview, which will force its rebinding, therefore this solution is not applicable to all scenarios:
protected void Page_Load(object sender, EventArgs args)
{
    RadFileExplorer1.TreeView.Nodes.Clear();
}


Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
John
Top achievements
Rank 1
answered on 03 Aug 2016, 03:44 PM

Sorry, but suggested solution hasn't worked.

Can you please let us know what is Primary Support Ticket? I tried to open ticket, but same issue. Only images are allowed in attachment.

 

For the second issue where folder is not refreshing automatically, it appears something to do with caching. As when we press CTRL+F5, all works well.

0
John
Top achievements
Rank 1
answered on 04 Aug 2016, 07:50 AM

We have also tried the solution for clearing cache mentioned in thread:

http://www.telerik.com/forums/possible-to-avoid-internal-caching-force-async-postback

 

function OnClientFolderLoaded(explorer, args)
    {
        explorer.clearFolderCache();
    }

 

But this doesn't work for us. On folder change, this function is fired but folder doesn't show newly uploaded files until we force clear cache the browser cache with CTRL+F5

0
Vessy
Telerik team
answered on 08 Aug 2016, 02:35 PM
Hi John,

By saying a primary support ticket I meant a standard, private support ticket, which allows also zip archives uploading. You can see the steps for submitting a ticket in the following video:
https://www.youtube.com/watch?v=pwOCFkmLGhU

We will be glad to assist you further on this case once we are able to reproduce and examine the issue at our end.

Looking forward to your reply,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
John
Top achievements
Rank 1
answered on 24 Aug 2016, 08:02 AM

Hi Team,

 

Thanks for your help.

 

This issue is resolved now. It was caused by setting up few elements of file explorer outside if(!IsPostBack){} condition.

 

0
Vessy
Telerik team
answered on 24 Aug 2016, 01:06 PM
Hi,

Thank you for the update, Neil - I am happy to know the issue is resolved now. Let us know show any further problem occurs.

Regards,
Vessy
Telerik by Progress
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
Neil
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Neil
Top achievements
Rank 1
John
Top achievements
Rank 1
Share this question
or