Thanks
Jason
19 Answers, 1 is accepted
In order to provide the Folder select functionality (like the one demonstrated in FileSelector Demo) I suggest you to use an external button and not to use OnClientFileOpen event.
For your convenience I have attached a sample project with the required functionality implemented.
Sincerely yours,
Dobromir
the Telerik team
on my aspx page i have the function
function OpenFileSelected(wnd, fileselected){
var textbox = $get("<%= RadTextBox1.ClientID %>");
textbox.value = fileselected;
}
So after the above function runs the value of the textbox does equal the folder path i selected, but the text doesnt display in the textbox. I click inside the textbox then the text apears.
any ideas?
thanks
When you use a RadTextBox, you need to use its textbox.set_value(fileselected) method in order to change the text. Also, you have to use the $find() method instead of $get() one. $find is used in order to get reference to an AJAX enabled control.
I hope this helps.
Regards,
Fiko
the Telerik team
On my main page I have a RadcomboxBox and I want to pass the value of that comboBox to the FileDialog Rad Window. How to do this?
In my main page I tried to change the:
function OpenFileExplorerDialog()
{
var wnd = $find ( "<%= FileExplorer.ClientID %>");
var combobox = $find ( "<%= RadComboBox1.ClientID %>");
var path = "explorer.aspx?id=" + comboxbox.get_text();
wnd._navigateURL = path;
wnd.show();
}
when debugging I do get the correct value in path and _navigateURL, however the page_load event for explorer.aspx seems to only execute the first time the user opens the radwindow. If the user closes the radwindow, makes a change to the combobox and reopens the radwindow the radwindows doesnt get the correct value from the combobox.
Thanks!!!!
In your case I recommend you to remove this line of the code:
wnd._navigateURL = path;
and replace it with this public method:
wnd.setUrl(path);
The behavior that you experience is the expected one, because by default RadWindow's ReloadOnShow property is set to false. In your case you need to set this property to true and in order to cause the RadWindow control to load its content page every time it is shown.
I hope this helps.
Greetings,
Fiko
the Telerik team
I want to select a folder and get the path in order to place it in a text box and then call a button that uses that path.
Could you please help me out?
Thanks!
Miguel
FileSelection functionality is entirely client-side and RadFileExplorer does not preserve information for the selected item upon postbacks. In order to pass the path of the selected folder on the server, I suggest you to store the value to a hidden filed.
Regards,
Dobromir
the Telerik team
No show Files?---
I need selected a Folder only!
You can display only folders in the RadFileExplorer by overriding the ResolveDirecotory() method of the content provider and return DirectoryItem with empty array as files, e.g.:
public
override
DirectoryItem ResolveDirectory(
string
path)
{
DirectoryItem originalFolder =
base
.ResolveDirectory(path);
List<FileItem> noFilesFiles =
new
List<FileItem>();
DirectoryItem newFolder =
new
DirectoryItem(originalFolder.Name, originalFolder.Location, originalFolder.FullPath, originalFolder.Tag, originalFolder.Permissions, noFilesFiles.ToArray(), originalFolder.Directories);
return
newFolder;
}
Best wishes,
Dobromir
the Telerik team
According to example ,In Explorer.aspx ?
Please accept my apologies for not being clear enough in my previous reply.
The provided code snippet is an override of a method of the RadFileExplorer's content provider. Please take a look at the following help article for more detailed information on how the content provider works:
Using custom FileBrowserContentProvider
In order to display only the folders you need to implement custom content provider to the RadFileExplorer which subclasses the default FileSystemContentProvider and just override ResolveDirecotory() method using the code from my previous reply.
An examples demonstrating how to implement custom content provider to RadFileExplorer and subclass FileSystemContentProvider are available in the following live demos:
FileExplorer / Custom File Content Provider
FileExplorer / Filter files and download
All the best,
Dobromir
the Telerik team
I have seen your zip code everything is good but i want change one thing i want to browse client Machine folder not application folder
can i Browse the client Machine folder instead of Root Folder of application if yes then how ?
It is not possible to access user's local hard drive using JavaScript. This is not a restriction of RadFileExplorer but is a general security restriction.
RadFileExplorer can be used to list physical directories that resides on the web server, or on a cloud server or even a file structure stored in a database, but to be able to list these files and / or manipulate them the web server which is running the website need to have the correct permissions.
Regards,
Dobromir
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
but Sir in case of <telerik:RadUpload ID="RadUpload1" runat="server"> </telerik:RadUpload> this we are able to browse particular file of client machine. but i don't want to browse particular file i want to browse folder (if this folder contain 5 file i want to upload all files on server on folder selection ) of client machine
Please give me solution of this problem
Hello Ravi,
Once again - one cannot control the folder the end user is going to browse on their own machine when choosing files to upload. This is a browser restriction. If such control were possible, web pages would have access to the file system, which would be a huge security issue.
If you want to be able to upload multiple files at once - you would need to use RadAsyncUpload: http://demos.telerik.com/aspnet-ajax/asyncupload/examples/multiplefileselection/defaultcs.aspx.
Regards,
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Sir Please build google drive folder upload like functionality in asp.net web project using Telerik control
Hello ,
I want same functionality for my razor view . Above code is not working for me. I am working in ASP MVC using razor . and my requirement isto select a folder from folder dialog then populate a kendo grid with the images containg in the selected folder.
Please help
The Telerik UI for ASP.NET AJAX suite is not tested under MVC environments and the controls from the AJAX suite are not supported in an MVC setup.They are based on the web form paradigm and heavily rely on the web form server lifecycle that is not available in an MVC environment.You can only add the AJAX controls to a standard web form in an MVC project. The Razor engine is not supported by the Telerik UI for ASP.NET AJAX controls.
We recommend using the UI for ASP.NET MVC, the Telerik product built from the ground up to support the principles of MVC development in your MVC projects. Since the FileExplorer control is not available in this suite, you can vote for its implementation at http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/3767267-fileexplorer.
Best regards,
Rumen
Progress Telerik