Change folder names via code

2 posts, 0 answers
  1. Ron
    Ron avatar
    5 posts
    Member since:
    Feb 2012

    Posted 17 Feb 2012 Link to this post

    I have a problem where I need to change the folder names to a useful name instead of a number.
    Our folder tree consists of just a folder within the project named "/files".

    But the folder names inside are just numbers related to userID, emailID, and so forth. (ex. /files/530-001)
    Is there a way to change/mask the name of a folder to something useful like a real name?
    Just need a little help in the right direction.
    If I can change just one 530-001 - I can figure out rest.

    Thank you
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 21 Feb 2012 Link to this post

    Hi Ronald,

    In order to change the name of the files and / or folders displayed in the file explorer, you need to subclass the RadFileExplorer's content provider and override the ResolveDirectory() / ResolveRootDirectoryAsTree() and change the Name property of the FileItem / DirectoryItem that is returned by the method.

    Please review the following help article for more detailed information regarding the RadFileExplorer's content provider:
    Using custom FileBrowserContentProvider

    Greetings,
    Dobromir
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top