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

Error when renaming a folder

3 Answers 89 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
akeel wall
Top achievements
Rank 2
akeel wall asked on 14 Oct 2009, 01:48 PM
Hi

I am trying to implement some validation on new folder name so that when a user changes a folder name to another name, he/she does not enter an invalid char in the new name.

When doing so, I tried to rename a folder from (name) to (name/), i.e I inserted a forward slash at the end of the folder name.

When presseing enter, the application timed out and my (RadFileExplorer1_ItemCommand) event never got triggered.

I also found another issue:

If I put the slash in the middle of the new folder name (i.e. na/me), in the RadFileExplorerEventArgs, and newpath parameter will be wrong!

I suggest that there should be internal validation on invalid characters both in file and folder names. Also, the newpath parameter should contain the new name of the folder rather than the whole path, so that if the developer did his/her own validation he can easily find the new name. This is particularly useful if the user entered a slash in the new folder name then If I parsed the full name I still get errors.

I hope my points are clear

Regards

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 20 Oct 2009, 06:08 AM
Hi Akeel,

I was able to reproduce the described behavior. The renaming and moving is the same operator in the RadFileExplorer control and the NewPath property of the RadFileExplorerEventArgs object contains the full virtual path when the folder is moved to different folder (not renamed). When you just rename a folder the NewPath property will contain only the new name of the folder. This behavior of the control, however, does not allow custom validation in your scenario: The Move event occurs and you need to check whether the new name (when the folder is renamed) contains the '/' character. We will do our best, however, to change the behavior of the control in order to avoid such a problems in the future releases.

Your Telerik points were updated.


All the best,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Santiago
Top achievements
Rank 1
answered on 25 Jul 2011, 02:03 PM
I'm having the same issue with 2011 Q1. Any news on how can be solved?

Regards,
Santiago.
0
Dobromir
Telerik team
answered on 27 Jul 2011, 11:54 AM
Hi Santiago,

This problem is still not resolved, and unfortunately, I am unable to provide suitable workaround. I have logged a new feature request for built-in verification for invalid characters in folder and file names. Here you can find the PITS Issue: Public URL

Greetings,
Dobromir
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.

Tags
FileExplorer
Asked by
akeel wall
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Santiago
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or