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

Ambiguous properties

3 Answers 73 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 04 Mar 2010, 10:03 PM
I was setting up some properties in the codebehind for the file explorer, and I came across some properties that don't seem to work as expected.

 

fileExplorer.Upload.AllowedFileExtensions  
fileExplorer.Configuration.SearchPatterns  
 
fileExplorer.Upload.MaxFileSize  
fileExplorer.Configuration.MaxUploadFileSize  
 
It appears to me that the properties for .Upload do not work, and they seem to be redundant if there are configuration properties that seem to have the same purpose. Were they accidentally left in when the configuration properties were created?
I believe I am using the 2009 Q3 release, but it could be Q2

When I added values to the AllowedFileExtensions, they did not show up on the upload form file extensions list, but when I used the SearchPatterns property, they showed up.

Sorry if this has already been fixed.

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 09 Mar 2010, 04:54 PM
Hi Jim,

By design, some of the properties of the embedded in RadFileExplorer control does not take effect. An example is the RadFileExplorer1.Upload.AllowedFileExtensions property of the RadUpload control. In this cases you need to use the exposed corresponding properties in order to apply the desired  - RadFileExplorer1.Configuration.SearchPatterns for the above example.

This behavior is by design and we strongly recommend you to use the RadFileExplorer's properties instead of setting the values directly to the embedded control's properties.

Best wishes,
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
Jim
Top achievements
Rank 1
answered on 11 Mar 2010, 06:10 PM
Why would you design properties that have no effect. The only purpose they serve is to confuse users.
In additional irony, if you specify file type restrictions for the file upload using the allowed file extensions property, it expects a list like this:
".bmp,.csv,.doc,.docx,.gif,.jpg,.jpeg,.pdf,.png,.tif,.txt,.xls,.xlsx" 
but if you use the SearchPatterns property of the explorer control, it expects a list like this:
*.bmp,*.csv,*.doc,*.docx,*.gif,*.jpg,*.jpeg,*.pdf,*.png,*.tif,*.txt,*.xls,*.xlsx 

if you don't use the * wild card character for the file explorer (which is not needed for the file upload), you will not be able to upload files.
0
Lini
Telerik team
answered on 15 Mar 2010, 03:48 PM
Hi Jim,

The RadFileExplorer is a composite control that uses other controls from the RadControls for ASP.NET AJAX suite (RadGrid, RadTreeView, RadUpload). These controls are simply exposed as properties (e.g. explorer.Upload) so you can fine tune them if needed. Since these are the normal RadControls, we cannot hide any of their normal properties and you see all public members even if they might not be used. The file explorer has a configuration of its own, which takes precedence over the configuration of its child controls. This is why you need to set explorer.Configuration.SearchPatterns instead of explorer.Upload.AllowedFileExtensions. You might ask why then we have two properties for the same setting? First of all, this was done so all information about paths and permissions can be easily available in one place (the Configuration property). The second reason is that the same configuration is used in the RadEditor control when setting up its file browser dialogs (Image Manager, Document Manager). In this case you have no easy access to the upload control in the dialog to set AllowedFileExtensions, but you have access to the same Configuration object and you can set ViewPaths, SearchPatterns, etc. from there. If you are not sure how to set the configuration, you can always look in our online documentation - http://www.telerik.com/help/aspnet-ajax/radfileexplorer-getting-started.html

Sincerely yours,
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.
Tags
FileExplorer
Asked by
Jim
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Jim
Top achievements
Rank 1
Lini
Telerik team
Share this question
or