Using the RadFileExplorer for ASP.NET AJAX in a MOSS web application

Posted by: the telerik blogs, on 17 Jun 2009 | View original | Bookmarked: 0 time(s)

The RadFileExplorer is a fairly new control in our ASP.NET AJAX suite and we are happy to see that a lot of people are already adopting it into their solutions. In this post I will show how to make the file explorer work with SharePoint libraries.

By default, the control interfaces with a virtual folder in your web application and allows you to do all kinds of file/folder operations (create new folders, upload/move/delete items, preview, etc.). Unfortunately, the default behavior of the control is limited to virtual folders that can be mapped to physical locations on the server's drives. MOSS web applications use "libraries" to store documents/images and these libraries are only available from the SharePoint database - the files are not stored as physical files on the server, they go in the database instead.

Using the RadFileExplorer in SharePoint web applications will require a new file browser content provider (the logic that connects the file explorer UI to the actual files/folders). Fortunately, we already have such a provider - the RadEditor control uses the RadFileExplorer in its dialogs and we have had a MOSS RadEditor version for some time now. The Editor and FileExplorer controls share the same content provider model. Here are the three steps you need to make to integrate the explorer in a SharePoint web part:

 

  1. You need to make sure that you have enabled the ASP.NET AJAX Extensions in your MOSS web application - http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax.html
  2. Next you need to deploy the Telerik.Web.UI assembly in the MOSS server's GAC. This way you can use the RadControls in your site collections - http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html
  3. When you add the RadFileExplorer in your web part, you need to set the [RadFileExplorer].Configuration.ContentProviderTypeName property to the SPContentProvider class.

 src=

 

I am attaching a simple SharePoint web part project for Visual Studio 2005, which includes the SPContentProvider class. If you have already done steps 1 and 2 above, you can deploy this project and the FileExplorer web part will show you all libraries in the current site and allow you to interact with them (if you have the required permissions for the libraries of course). I used the 2009.1.527 release of RadControls for ASP.NET AJAX to build and test the web part.

FileExplorer_MOSS_WebPart 

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2874 | Hits: 10

Similar Posts

  • ASP.NET 4 Web Server Here Shell Extension more
  • Upgrade Wizard: auto-upgrades and more more
  • ASP.NET 4 Beta 2 - New Version, New Docs, New MSDN Site ! more
  • Announcing Microsoft Ajax Library (Preview 6) and the Microsoft Ajax Minifier more
  • HealthVault 0908 SDK Highlights more
  • My ASP.NET MVC stack and why I chosen it more
  • Web Deployment Tool released to web (RTW) more
  • Why not Classic (Legacy) ASP? more
  • Announcing the WebsiteSpark Program more
  • Accessing Images On Flickr From An ASP.NET Website Using The Flickr.Net Library more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD