If I specify viewpaths, uploadpaths, deletepaths, and SearchPatterns properties in the ASPX file, then the control works, i.e., the SearchPatterns are applied and I can upload files.
If I specify viewpaths, uploadpaths, deletepaths, and SearchPatterns properties in my code behind, then I have the following problems:
- upload is not enabled;
- delete button is not enabled; and
- SearchPatterns are not applied.
I use version 2010.1.309.35.
ASPX:
<telerik:RadFileExplorer runat="server" ID="explorer" EnableViewState="true" Width="700px" Height="480px" > |
<Configuration ViewPaths="~/Content/1/" UploadPaths="~/Content/1/" DeletePaths="~/Content/1/" MaxUploadFileSize="8000000" SearchPatterns="*.png" /> |
</telerik:RadFileExplorer> |
C#:
string[] paths = new string[] { "~/Content/2/", "~/Content/1/"}; |
explorer.Configuration.MaxUploadFileSize = 1024 * 1024 * 8; // 8Mb |
explorer.Configuration.SearchPatterns = new string[] { "*.png", "*.jpg", "*.gif" }; |
explorer.Configuration.ViewPaths = paths; |
explorer.Configuration.UploadPaths = paths; |
explorer.Configuration.DeletePaths = paths; |