I'm looking for a way of not just selecting files for upload but entire folder structures. I was hoping I could use the CreateOpenFileDialog delegate to return the RadOpenFolderDialog however this function expects a return type of Microsoft.Win32.OpenFileDialog which the Telerik controls do not inherit from.
6 Answers, 1 is accepted
You are right. The CreateOpenFileDialog delegate returns an object of type OpenFileDialog which is not the base class of the RadFileDialog controls.
To achieve your requirement you can hide the default Browse button via the Buttons property of RadCloudUpload, and then add a new button over the control. When you click the new button you can open a new folder dialog and when you choose a folder you can get its file names and add them in the cloud upload programmatically.
I hope that helps.
Thanks for your response. Since posting I have actually solved the problem by implementing drag and drop from Windows Explorer which, as you suggest, programmatically adds the files to the upload control. I had to do some interesting things in order to retain folder structure though as the default implementation only takes the filename when calling the upload provider!
It is nice to hear that you've found a solution for your case. Thank you for sharing your code.
I've just encountered another issue with the Cloud Upload control. It seems that if I use the "Cancel" button mid transfer I am getting a state transition from "Cancelling" to "Uploaded". Surely it should end up on the "Cancelled" state?
I've tested this but I wasn't able to reproduce it. Can you take a look at the attached project and let me know if I am missing anything?