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

Show/Hide Root Folder

2 Answers 157 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Paul Hopper
Top achievements
Rank 1
Paul Hopper asked on 19 Mar 2009, 07:20 PM
I'd like the option to show/hide the root folder in the treeview (or to have several root folders instead of just the one).  I'd like to replace a homegrown solution with this composite control, but that (and the lack of date created/modified columns) is one of the biggest hurdles.  I'm currently looking to see if I can customize the composite control myself, but would like to see this as a built-in option somewhere down the line.

2 Answers, 1 is accepted

Sort by
0
Accepted
Tervel
Telerik team
answered on 23 Mar 2009, 05:07 PM
Hi Paul,

Up to your questions:

#1. You can show multiple "root" folders because the ViewPaths propeprty of RadFileExplorer is of type string array.
For example, showing declaratively 3 root folders can be done like this:

ViewPaths="~/FileExplorer/Examples/Default, ~/FileExplorer/Examples/Overview, ~/FileExplorer/Examples/FileSelectorDialog"

#2. Adding full-blown extra columns is not possible to do at this point.
You can to somewhere, but not 100%. For example, you can add more columns to the RadGrid, e.g. like this:
   GridBoundColumn boundColumn = new GridBoundColumn();
    boundColumn.HeaderText = "Date Created";
    RadGrid grid = FileExplorer1.Grid;
    grid.MasterTableView.Columns.Add(boundColumn);

Then, to bind the grid, RadFileExplorer uses client-side biding based on the ASP.NET 2.0 callback mechanism - you can get a reference to the grid on the client and modify how things get done there as well.

But, there is one piece of the puzzle missing, or rather - it is not accessible. The RadFileExplorer uses FileBrowserItem objects, which have a certain definition/properties. While it is possible to inherit this class, it is not possible to "trick" the RadFileExplorer to use your inherited objects that might contain additional information for serialization.

We added this functionality in our TODO list for the control, and will do our best to implement it during this Q, because we believe it will open up many possibilities for the RadFileExplorer.
 
Best regards,
Tervel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Paul Hopper
Top achievements
Rank 1
answered on 23 Mar 2009, 05:11 PM
Thank you, Tervel!

#1 is so obvious, I'm disappointed that I didn't realize that on my own!

Glad to hear that support for #2 is on the to-do list.  Will be hoping to see it included in Q1.  Thanks again!
Tags
FileExplorer
Asked by
Paul Hopper
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Paul Hopper
Top achievements
Rank 1
Share this question
or