14 Answers, 1 is accepted
Please find a detailed example of how to add a custom column to the Grid component of the RadFileExplorer in the following Live Demo:
FileExplorer / Add custom columns
Information regarding the last modification made to a file / folder is available in the LastWriteTime property of the FileInfo/DirectoryInfo object.
Sincerely yours,
Dobromir
the Telerik team
The "Dete Modified" columns is not built-in because it will increase the size of the FileBrowser dialogs of RadEditor. That is why we provided the ability to add custom columns to the FileBrowser control for the users that want to customize the control.
Nevertheless, if more users request this column to be part of the FileExplorer we will consider its addition to the control.
All the best,
Rumen
the Telerik team
We use radeditor in our sharepoint 2010 environment. I am trying to implement a similar functionality whereby the user can see the 'Dat Created' or 'Date Modified' in the radfileexplorer. Could someone kindly help me to implement this. The example link in the above post is not working either.
kind regards,
Anu
Here is the working link: http://www.telerik.com/help/aspnet-ajax/radfileexplorer-adding-custom-columns.html.
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks for your reply. I managed to get these links. However, I am struggling with the implementation since I am trying to make changes using javascript in the FileBrowser.ascx file. A bit lost here.
We have enabled telerik feature at site level so that RadEditor opens up automatically when a user tries to Edit a list item. In this list item, user has an option to click the 'Image manager' icon, which opens up the radfileexplorer. Since this is enabled as a site feature, I am not sure where and how I should make these modifications.
Could you please guide me in the right direction?
kind regards,
Anu
For your convenience I prepared and attached an example how to modify the FileBrowser dialog of the regular RadEditor for ASP.NET AJAX control.
The example is based on the following articles:
Displaying single upload control in the FileBrowser Upload manager,
Adding custom columns in the RadFileExplorer's grid
and
Using custom FileBrowserContentProvider.
The first KB article will show you how to get a reference to the RadFileExplorer control in the FileBrowser dialog from the server. Therefore you will be able to implement a FileSystemContentProvider and implement the solution in the second and third articles. All these steps are implemented in the attached project. You can see how it works in this video: http://screencast.com/t/AuUl2VpYVJ.
In order to integrate this solution in SharePoint you should do the following:
1) See how to register the external dialogs of RadEditor for SharePoint: ExternalDialogsPath property.
2) To be able to reference the UserControl.ascx in the FileBrowser.ascx dialog, it should be build as an assembly which is registered in the GAC (Global Assembly Cache). You should create a project which contains the UserControl.ascx control and build it. After that add the produced assembly to your GAC.
3) The final step is to add a SafeControl for this assembly in the web.config file of the SharePoint application (inetpub\wwwroot\wss\VirtualDirectories\80\web.config).
Best regards,
Rumen
the Telerik team
Thank you very much for a detailed explanation. I have done everything as described in your post and the articles and now get an error message when I click on the 'Image Manager'.
1. Copied the 'EditorDialogs' folder to resources folder
2. ExternalDialogsPath property is set in configFile.xml and listconfigfile.xml (http://www.telerik.com/help/aspnet-ajax/moss-sp2010_externaldialogspath_property.html)
3. I have a sharepoint project in visual studio. Added the user control to this project so that it get deployed in the 'Control Templates' folder of sharepoint.
4. The project is deployed and the safe controls are added to the web.config file.
5. To register the custom user control in the filebrowser.ascx, the following lines are added to the filebrowser.ascx
<%@ Register TagPrefix="custom" TagName="customControl" Src="~/_controltemplates/UserControl.ascx" %> |
<custom:customControl ID="customControl1" runat="server" /> Unfortunately, I am getting runtime error when I click on the 'Image Manager' of rad editor. Inspite of chaning the web.config (sharepoint site) file's CustomErrors tag, I cannot see details of this error message. I know I am nearly there. Would appreciate some more help from you to complete this. Please do reply to this when you get a chance. kind regards, Anu |
Could you please open a support ticket and send your ConfigFile.xml, ListConfigfile.xml, UserControl.ascx, FileBrowser.ascx, the web.config and the assembly file so that I can examine them?
Best regards,
Rumen
the Telerik team
Your sample project works very well.
But When I convert the project to newer version of Telerik Rad Contols (Telerik.Web.UI, Version=2012.2.522.40), I get an error about null of grid control in FileExplorer.
rfe.Grid.Columns.Add(gridTemplateColumn1)
Grid is null when the page load event occured. But all of other components in it are created.
your sincelery.
You may experience this behavior if the explorer is configured to display the items as thumbnails (ExplorerMode="Thumbnails"). In such configuration the Grid property returns null because the grid component is not available. If this is the case, you should check if the Grid is not Null and then add the custom column.
All the best,
Dobromir
the Telerik team
Hi,
I fixed this in the page_prerender. It not always worked for me in the Page_Load.
// Add a new column for the date
Telerik.Web.UI.GridTemplateColumn gridTemplateColumn1 = new Telerik.Web.UI.GridTemplateColumn();
gridTemplateColumn1.HeaderText = "Creation Date";
gridTemplateColumn1.SortExpression = "Date";
gridTemplateColumn1.UniqueName = "Date";
gridTemplateColumn1.DataField = "Date";
if (RadFileExplorer1.Grid != null)
if (RadFileExplorer1.Grid.Columns.FindByUniqueNameSafe("Date") == null)
{
RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(ExtendedFileProvider).AssemblyQualifiedName;
RadFileExplorer1.Grid.Columns.Add(gridTemplateColumn1); // Add the first column
}
best regards,
Fandy Backers
Hi Fandy,
Thanks for sharing your solution with the community. Your Telerik points are updated.
Regards,
Rumen
Progress Telerik