Upload and delete buttons are disabled when using custom content provider

16 posts, 0 answers
  1. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 15 Jul Link to this post

    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.

     

  2. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 20 Jul Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 21 Jul in reply to Vessy Link to this post

    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?


     

     

  5. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 21 Jul Link to this post

    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.
  6. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 21 Jul in reply to Vessy Link to this post

    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? "

  7. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 22 Jul Link to this post

    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.
  8. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 26 Jul in reply to Vessy Link to this post

    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?

  9. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 29 Jul Link to this post

    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.
  10. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 29 Jul in reply to Vessy Link to this post

    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'?
  11. Neil
    Neil avatar
    11 posts
    Member since:
    Apr 2011

    Posted 01 Aug Link to this post

    Hi Telerik Team,

    Gentle reminder!

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

  12. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 03 Aug Link to this post

    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.
  13. John
    John avatar
    6 posts
    Member since:
    Apr 2011

    Posted 03 Aug Link to this post

    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.

  14. John
    John avatar
    6 posts
    Member since:
    Apr 2011

    Posted 04 Aug Link to this post

    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

  15. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 08 Aug Link to this post

    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.
  16. John
    John avatar
    6 posts
    Member since:
    Apr 2011

    Posted 24 Aug in reply to Vessy Link to this post

    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.

     

  17. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 24 Aug Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017