This is a migrated thread and some comments may be shown as answers.
Filter files/Change Name/Show specific files
1 Answer 46 Views
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 29 Nov 2009, 05:03 AM

I need to have this:

1) Upload *.jpg, *.pdf, *.doc, *.docx, *.xls
2) Change the file name during the upload, ie if the filename is some.jpg at the end I need 12345some.jpg
3) In the grid only show 12345*.* files
4) Only show the grid, toolbar,contextmenu
5) Manage codebehind during a callback the permission for upload, delete

How can I do this?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 02 Dec 2009, 08:30 AM
Hello Iomega,

In reference to your questions:
  1. You need to set the SearchPaternsProperty of the RadFileExplorer control:
    RadFileExplorer1.Configuration.SearchPatterns = new string[] { "*.jpg", "*.pdf", "*.doc", "*.docx", "*.xls" };
  2. You need to implement a custom content provider and override the StoreFile method. That method is called when a file us uploading. In your case I recommend you to subclass the FileSystemContentProvider class.
  3. I believe that this KB article will be of help
  4. You can use this code in order to achieve the desired result:
    RadFileExplorer1.VisibleControls = Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid |
                                       Telerik.Web.UI.FileExplorer.FileExplorerControls.Toolbar |
  5. Page_Load is the latest event, where you can set the paths properties of the RadFileExplorer control. The code should looks like this:
    protected void Page_Load(object sender, EventArgs e)
        string[] paths = new string[] { "~/images/", "~/documents/" };
        RadFileExplorer1.Configuration.ViewPaths = paths;

I hope this helps.

the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Telerik team
Share this question