Protected Sub rdgSurveys_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rdgSurveys.SelectedIndexChanged |
SetFileExplorerPaths() |
End Sub |
Protected Sub SetFileExplorerPaths() |
If rdgSurveys.SelectedValue > 0 Then |
rfeDocuments.Enabled = True |
Dim surveyPath = "~/bin/Documents/Survey_" + rdgSurveys.SelectedValue.ToString |
Dim paths As String() = {surveyPath} |
rfeDocuments.InitialPath = surveyPath |
rfeDocuments.Configuration.UploadPaths = paths |
rfeDocuments.Configuration.ViewPaths = paths |
rfeDocuments.DataBind() |
Else |
rfeDocuments.Enabled = False |
End If |
End Sub |
10 Answers, 1 is accepted
To set the initial path properly, you need to convert the root relative Url.
e.g.
Dim surveyPath = Page.ResolveUrl("~/bin/Documents/Survey_") + rdgSurveys.SelectedValue.ToString |
I hope this helps. If you still experience problems after that, it will be best to open a support ticket and to send us a sample project where this issue could be reproduced - we will check it right away.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
We already answered your support ticket, but I believe that the attached demo will be of help for our customers that read this thread.
Sincerely yours,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
can you explain me how I can set initial path if I'm using SPContentProvider class? Is there a different approach?
radFileExplorer.Configuration.ViewPaths = new string[] { "/MyRootFolder" };
radFileExplorer.InitialPath = "/MyRootFolder/1. vrstva ŘÃdÃcà dokumenty/Kolektivnà smlouva/";
I know that the path is case sensitive so I have checked twice the source path.
Thx your very much
Pavel
another frustrating problem.....
I'm using RadFileExplorer control in UserControl and I need to set ViewPaths and other properties after an user clicks on my button.
Following error will occur after click:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Value cannot be null.
Parameter name: virtualPath
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: virtualPath
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: virtualPath]
System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +8851319
System.Web.VirtualPathUtility.GetFileName(String virtualPath) +12
Telerik.Web.UI.Widgets.FileSystemContentProvider.ResolveRootDirectoryAsTree(String path) +128
Telerik.Web.UI.RadFileExplorer.GetFileGridData(String path, String sortExpression, Int32 startIndex, Int32 maxRowNumber, Int32& itemsCount) +266
Telerik.Web.UI.RadFileExplorer.DescribeComponent(ScriptComponentDescriptor descriptor) +1967
Telerik.Web.UI.RadWebControl.Telerik.Web.IControl.DescribeComponent(ScriptComponentDescriptor descriptor) +39
Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +182
Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(WebControl control) +31
Telerik.Web.UI.RadWebControl.GetScriptDescriptors() +30
Telerik.Web.UI.RadWebControl.System.Web.UI.IScriptControl.GetScriptDescriptors() +33
System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +491
System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +50
Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +66
Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +149
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
Thanks again for your help.
Pavel
The "Value cannot be null." has been fixed and the fix will be included in the Q2 2009 official release.
The value of the InitialPath property must be equal to what you see in the address bar of the file explorer control when you have navigated to the folder you want to be opened initially.
Regards,
Lini
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
If you have not done so already, please open a formal support ticket and send us some more information about your project, a test page, or a complete sample project, so we can see the error here and provide you with a solution. Thanks in advance for your cooperation!
Sincerely yours,
Lini
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
how do I change InitialPath over AjaxRequest?
Thanks for a hint,
Andreas
InitialPath is only taken into account when the file explorer is first loaded and populated with data. If you want to change the folder after that, you can use the explorer.loadFolder(path) client API method. This will make an Ajax request and change the current folder in the file explorer's tree and grid components.
Sincerely yours,
Lini
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.