
Thanks,
Dave
17 Answers, 1 is accepted
Yes, this is possible and for your convenience I have attached a working project in which the RadFileExplorer control is loaded dynamically.
Kind regards,
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.

Thanks for the response but I still am having problems and I believe I should have gone into more detail on my first post.
I uses a database to dynamically generate many site pages from one aspx page. On that page I have a asp:panel that loads different user controls into the page as needed. I also use URL rewriting on this page. I have many different user controls utilizing various Rad Contols, grids, scheduler, etc. which all work fine. I did have to add some javascript onto some of the controls for this to work with the URL rewriting.
I believe I may be having problems with both dynamically loading the control and with the rewriting. I have set up some very simple test pages to try and work thru the problem.
First I created a page with the File Explorer in it to make sure I wasn't having permission problems and it works fine.
Next I created a test page with the code you supplied to dynamically add the File Explorer and while it creates, deletes, moves and renames folders it will not upload files. It will rename, move, view and delete files but I get a "path/filename : Cannot Write To Target Folder" error when I try to upload.
This is the same thing that happens when I use my normal routine to load the File Explorer
I then loaded the control into my page with the URL rewriting and when I click on a folder the loading panel comes up, I get an "Invalid argument" error on the page and the loading panel does not close.
The javascript below is what I use on url rewriting page(s) with dynamically loaded user controls using controls like the the Radgrid. This works great.
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> |
<script language="javascript" type="text/javascript"> |
//<![CDATA[ |
Sys.Application.add_load(function() |
{ |
var form = Sys.WebForms.PageRequestManager.getInstance()._form; |
form._initialAction = form.action = window.location.href; |
}); |
//]]> |
</script> |
</telerik:RadCodeBlock> |
If I add this to the Control with the File Explorer on the url rewite page and click on a folder I get :
callback loading error:
the target 'customCntl$RAdFileExplorer1' for the callback could not be found or did not implement ICallbackEventHandler.
It will however allow me to hit the refresh button or create a new folder on the File Explorer and if I do so it will now work. It will allow me to do everything as above but upload a file. If I try to upload a file I get the "path/filename : Cannot Write To Target Folder" error and after that the "callback loading error:" above if I click on a folder. But if I hit the refresh button or create a new folder it works again allowing me to do everything except upload a file.
I believe the 2 issues are uploading a file with the dynamically added control and somehow initializing the control on a page with URL rewrites.
Any help would be greatly appreciated!
Thanks,
Dave
We are not sure what causes the problems you experience with the FileExplorer control, but we have two suggestions for you: first, you can try updating to the latest internal build from our site (http://www.telerik.com/account/latest-internal-builds.aspx). The current internal build features some fixes that might help with the "Cannot write to target folder" when loading the control dynamically on the page. If the internal build does not help, please open a formal support ticket and send us a simple test project, where we can see the problems. Thank you in advance for your cooperation!
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.

Lini,
Thanks for the reply. I have updated to the current build and am still not able to upload with the dynamically added File Explorer.
The attached project from Fiko's post above does not work for me. It does everything but upload.
Please let me know if it allows you to upload a file.
Best regards,
Dave
I think the problem in Fiko's example is that the FileExplorer is added to the page control tree too late and cannot load its ViewState (upload paths, view paths) in time when there is a file upload. I think in the example, the control is added in the Page_Load event. That is why it refuses to save the file (upload paths is still empty). To fix this, you can try to load the user control earlier in the page lifecycle (e.g. in the Init event):
Default.aspx.cs:
public partial class _Default : System.Web.UI.Page |
{ |
protected override void OnInit(EventArgs e) |
{ |
base.OnInit(e); |
Control fileExplorerControl = this.LoadControl("WebUserControl.ascx"); |
this.Form1.Controls.Add(fileExplorerControl); |
} |
} |
I hope this helps.
Greetings,
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.

Loading the File Explorer in the OnInit event corrected the errors.
Thanks for the help,
Dave

I am trying to implement a one page website using user controls as my content pages and using urlrewriting to change parameters to load the user controls.
Were you successful in getting this to work? As I have been trying to update my url address bar with the correct url when a radtab is clicked but it doesnt change.
Any insight would be great.
Thank you.
Mike
I am not quite sure that I understood your requirements. Could you please provide more information about the expected result? It will be best if you send me some screenshots of the expected behavior.
Regards,
Fiko
the Telerik team

I have opened a thread with the same question below.
http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/radtabstrip-url-rewriting.aspx
Mike

Mike,
I will post a reply under your new thread.
Dave

I want to add user control to file explore upload window . how can i do this ,please provide any reference or document.
RadFileExplorer does not offer the functionality to customize its Upload dialog out-of-the-box, and adding a user control to the dialog is not possible. However, it is possible to add custom fields to the dialog using the approach provided in this forum thread.
Greetings,
Dobromir
the Telerik team

Thanks for replay.
Is there any way to replace file explorer upload window to my custom popup window.
In short, no, the Upload dialog's functionality is tightly incorporated with the RadFileExplorer itself and control cannot be hooked up with different upload tool.
However, It is possible to use a third-party upload control and use the explorer as the file/folder listing tool but some of the upload related functionality will not be available. To add a custom dialog to the control you can use a popup control (i.e. RadWindow) that can be shown from a custom toolbar button.
For your convenience, I have attached a sample page demonstrating the above mentioned approach.
All the best,
Dobromir
the Telerik team

Hi Lini,
I am adding a user control which contains RadFileExplorer. I add the control during Init as mentioned in the thread.
The toolbar of RadFileExplorer Works fine. However when I want to expand the the content of a folder from tree view;I get an "There was an error in the call back"
The odd Things is that if I click on a toolbar button first, then I can expand the content of the folder later,
Do you have any idea ?

My user control is shown in an updatepanel and I have implemented my own custom FileContentProvider.
The most probable reason for the experienced problem is the Update panel wrapping FileExplorer. The FileExplorer's functionality is heavily based on client-side callbacks and it is highly recommended not to be externally ajaxified. That's why, could you please disable the AJAX and see if the problem still exists?
Regards,
Vessy
Telerik