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

Show File Last Modified Date

14 Answers 531 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 18 Jun 2010, 10:08 PM
Does anyone know if it is possible to display a column in the grid of the FileExplorer that displays the file's last modified date?

14 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Jun 2010, 10:28 AM
Hi Dean,

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
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
Dean
Top achievements
Rank 1
answered on 22 Jun 2010, 02:37 PM
Thanks!  That did the trick.  I should have found that.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 22 Feb 2011, 04:40 PM
I appreciate that the FileExplorer control can be modified to include custom columns, but why is "Date Modified", which is a default column found on every real-world file explorer I have ever seen, not one of the built-in columns in FileExplorer, like file size is? In other words, why must developers implement a Custom FileSystemContentPrivder and Custom GridTemplates just to provide this standard column?
0
Rumen
Telerik team
answered on 25 Feb 2011, 03:38 PM
Hello Albert,

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
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Anu
Top achievements
Rank 1
answered on 12 Sep 2011, 12:41 PM
Hi,

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
0
Rumen
Telerik team
answered on 13 Sep 2011, 02:53 PM
Hello 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.
0
Anu
Top achievements
Rank 1
answered on 13 Sep 2011, 04:08 PM
Hi Rumen,

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
0
Rumen
Telerik team
answered on 14 Sep 2011, 01:01 PM
Hi 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
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
0
Anu
Top achievements
Rank 1
answered on 15 Sep 2011, 03:43 PM
Hi Rumen,

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
0
Rumen
Telerik team
answered on 20 Sep 2011, 03:50 PM
Hello 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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Birol
Top achievements
Rank 1
answered on 26 May 2012, 07:00 PM
Hi Rumen
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.
0
Dobromir
Telerik team
answered on 29 May 2012, 09:12 AM
Hi Birol,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Fandy Backers
Top achievements
Rank 2
answered on 28 Nov 2019, 08:47 AM

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

 

 

0
Rumen
Telerik team
answered on 02 Dec 2019, 04:48 PM

Hi Fandy,

Thanks for sharing your solution with the community. Your Telerik points are updated.

 

Regards,
Rumen
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
Dean
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Dean
Top achievements
Rank 1
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Rumen
Telerik team
Anu
Top achievements
Rank 1
Birol
Top achievements
Rank 1
Fandy Backers
Top achievements
Rank 2
Share this question
or