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

List Files from Multiple Locations

1 Answer 30 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Skip
Top achievements
Rank 1
Skip asked on 28 Jan 2019, 01:46 PM

I'm curious if it is possible to list a bunch of files from a bunch of different locations.

Here's my scenario.

I'm creating a training and certification tracking website for our organization.  When an employees attend a training session or class everyone signs in on a sign in sheet.  The sign in sheet is then uploaded one time to the class' record ID and stored in a folder like this ~/files/hr/classes/{unique class id record key}.

Of course the employee records also have unique keys and they are enrolled in the classes.

I've already put a hyperlink in a radgrid that brings them to the details page for the class showing all the documents and attendees. 

Is it possible to have one fileExplorer on the "Employee Details" page that shows all uploaded documents for all the classes they attended in one place?  Maybe even all the folders listed in the folder explorer window?  It would be really cool if they could select the RadGrid row and have the FileExplorer update it's location.  maybe I'll do that as a work around. 

 

What have others done in similar situations?  Thanks Telerik Forum Members!

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 31 Jan 2019, 12:18 PM
Hi Skip,

RadFileExplorer can render multiple root directories, all you need to do is pass them to its paths arrays:
RadFileExplorer1.Configuration.ViewPaths = new string[] { "~/files/hr/classes", "~/files/finance" };


You can also update the Viewpaths of the control whenever you know the Unique class ID. For example:
<telerik:RadButton ID="Btn1" runat="server" Text="LoadDetails" OnClick="Btn1_Click"></telerik:RadButton>
<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"></telerik:RadFileExplorer>
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadFileExplorer1.Configuration.ViewPaths = new string[] { "~/files/initialFolder" };
    }
}
 
protected void Btn1_Click(object sender, EventArgs e)
{
    string uniqueID = "Class_AB1"; //your logic here;
    RadFileExplorer1.Configuration.ViewPaths = new string[] { string.Format("~/files/hr/classes/{0}", uniqueID)};
}

I hope this helps.

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileExplorer
Asked by
Skip
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or