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

FileExplorer Sharepoint multi Document library

5 Answers 106 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
pimpo pimpo
Top achievements
Rank 1
pimpo pimpo asked on 19 May 2010, 01:53 PM
Hi,

i use FileExplorer with Sharepoint 2007 and i want to display only the documents library and i have 5 Documents Library.

I think i must change my content provider but How ? and if its possible ?

Thanks for your answers.

Best Regards.

5 Answers, 1 is accepted

Sort by
0
pimpo pimpo
Top achievements
Rank 1
answered on 20 May 2010, 08:54 AM
Nobody can help me please ?
0
Fiko
Telerik team
answered on 21 May 2010, 12:12 PM
Hello Pimpo,

I believe that this blog-post will be of help.

All the best,
Fiko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
pimpo pimpo
Top achievements
Rank 1
answered on 21 May 2010, 01:27 PM
Thanks you for your answer.

But i know this blog, and i used this.

With this provider, we can see the arborescence of the site but no the sub site.

For Exemple :

I create my site "mySite" => "mySite" have 2 subsites => SubSite 1 and SubSite 2 and the 2 SubsSites have 2 doclibraries.

I want that the fileExplorer diplays my 2subsites when i define the rootPath on "mySite".


How can do this ?


0
Lini
Telerik team
answered on 25 May 2010, 11:32 AM
Hello,

The content provider for the RadFileExplorer works with only with libraries. It does not allow you to browse to sites and subsites directly. All of the paths you specify for the ViewPaths must be libraries in the current site collection. If you want to show sites and subsites, you need to change the content provider source that comes with the SharePoint project in the mentioned blog. For more information about the code in a custom content provider, see the file explorer documentation - http://www.telerik.com/help/aspnet-ajax/radfileexplorer-custom-filebrowsercontentprovider.html

Kind regards,
Lini
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tomas
Top achievements
Rank 1
answered on 25 May 2010, 10:23 PM
pimpo, you can do this, but you have to create the DirectoryItem objects yourself.  Here's how I did it:

First, I set my root path:

string[] paths = { SPContext.Current.Site.RootWeb.Url };  
fileExplorer.Configuration.ViewPaths = paths; 

Then, in my custom FileBrowserContentProvider I create directories from the urls.  After that, everything is very similar to Stoyan's blog, but you just have to add on that extra level of SPWeb DirectoryItem objects.

private static DirectoryItem CreateSPDirectoryItem(string absoluteUrl, bool isRecurseForWebs, bool isFilterFiles)  
{  
    DirectoryItem di = CreateEmptyDirectoryItem();  
    SPSecurity.RunWithElevatedPrivileges(delegate()  
    {  
        // process site  
        using (SPSite siteClxn = new SPSite(absoluteUrl))  
        {  
            using (SPWeb web = siteClxn.OpenWeb())  
            {  
                if (IsPathWebAbsUrl(absoluteUrl, web)) // this is a website  
                    di = CreateSPWebDirectoryItem(web, absoluteUrl, isRecurseForWebs, isFilterFiles);  
                else // this is a lib/folder  
                    di = CreateSPFolderDirectoryItem(web, absoluteUrl, true, isFilterFiles);  
            }  
        }  
    });  
    return di;  

It's been a while since I wrote this, so maybe you don't need all the parameters for your solution, but you get the idea.
Tags
FileExplorer
Asked by
pimpo pimpo
Top achievements
Rank 1
Answers by
pimpo pimpo
Top achievements
Rank 1
Fiko
Telerik team
Lini
Telerik team
Tomas
Top achievements
Rank 1
Share this question
or