Welcome Guest Search | Active Topics | Sign In | Register

File Explorer Control - basic help Options
Ron Rushing
Posted: Wednesday, November 12, 2008 8:25:01 AM
Rank: Member
Groups: Member

Joined: 10/28/2008
Posts: 23
How can I get some help with the File Explorer control as it is complex and the documentation is light. I would like to press a button (asp.net via vb.net), have the explorer open, select a file path, the path fill a text box and the Explorer close.

Thanks
eo_support
Posted: Wednesday, November 12, 2008 8:35:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Ron,

The key to work with FileExplorer is to understand what belongs to the FileExplorer control and what does not. Try think FileExplorer as an "extended" TreeView control. It allows you to browse/upload/delete files. Some of the UI elements that you are looking for are not part of the FileExplorer:

1. Open/close the file explorer. This is implemented by a Dialog control. So for anything regarding to that you would be looking for the documentation for the dialog, not the FileExplorer;
2. Path fills a TextBox. FileExplorer provides TargetControl property for you to specify the ID of the TextBox for you to fill. The TextBox is not part of the FileExplorer;

Once you divide them into different issues, you can look into their specific documentations and things should be much easier.

Hope this helps. Please feel free to let us know if you have any more questions.

Thanks!
Ron Rushing
Posted: Wednesday, November 12, 2008 11:01:45 AM
Rank: Member
Groups: Member

Joined: 10/28/2008
Posts: 23
I have the dialog figured out and via button click I can display the folder (Tree) and the Grid (blank). My problem is I cannot figure out how to populate the grid from the tree that is in a fileexplorer inside a dialog.

Help
eo_support
Posted: Wednesday, November 12, 2008 11:11:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You never need to fill the TreeView or Grid by yourself, the FileExplorer should do that for you. You can find detailed step by step instruction here:

http://www.essentialobjects.com/ViewDoc.aspx?t=FileExplorer%2fstart.html

You may want to go these steps along with our sample pages because those pages are already working. Once you get are familiar with those options, you can compare your own page with the sample page and it should be easy for you to find out the problem.

Thanks!
Ron Rushing
Posted: Wednesday, November 12, 2008 12:42:51 PM
Rank: Member
Groups: Member

Joined: 10/28/2008
Posts: 23
I have most of it working now ... how do I set the Root folder property of the fileexplorer to My Desktop so I can navigate to all of the folders and drives?

Is there a way to disply the File Type and Date Modifed in the grid (similar to FileName)?

Is there a way to change the / to a \ in the target path results? so is is \folder1\filename instead of /folder1/filename?
eo_support
Posted: Wednesday, November 12, 2008 1:19:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Ron,

You might be confusing about client side files and server side files. FileExplorer is an ASP.NET server controls and it is used to view files on the server. "My Desktop" is the deskotp folder for the current interactively logged in Windows user, which is very much a client side thing.

Having that said, you can virtually view anything on the server, except that the directory must be part of your web application. So in order to view anything outside of your root directlry, you will want to go to IIS to add that directory as a virtual directory under your application. Technically we could remove such requirement so that you would be able to point the FileBrowser's RootFolder to your "c:\Windows", but I doubt whether you want your website user to mess with your system files. :)

Currently the FileGrid only supports a list of built-in file icons. It does not support Date Modified either. We are looking to add support for custom columns though.

You can change the target path with JavaScript. In order to do that you will need to:

1. Clear the FileExplorer's TargetControl property because you will be setting the value with your own code;
2. Handle the FileExplorer's ClientSideOnFileSelected event and do whatever you want to do there. It will be something like this:

Code: JavaScript
function file_selected(fe)
{
    //Get the current selected file
    var selectedFile = fe.getSelectedFile();
    
    //Do whatever you want to do with it. Here we
    //simply put it into a textbox
    document.getElementById("TextBox1").value = selectedFile;
}


Code: HTML/ASPX
<eo:FileExplorer ClientSideOnFileSelected="file_selected" ...>
....
</eo:FileExplorer>


Hope this helps.

Thanks!
Ron Rushing
Posted: Wednesday, November 12, 2008 1:26:12 PM
Rank: Member
Groups: Member

Joined: 10/28/2008
Posts: 23
I need for the users to find a file on there local workstation versus the server. your note references that this may be possible. How would I configure to point to the local workstation versus the server (is this possible)?
eo_support
Posted: Wednesday, November 12, 2008 1:35:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

No. It is not possible to use FileExplorer to view local workstation files. FileExplorer is based on standard DHTML and JavaScript. No browser will allow you to do that with JavaScript because then people will be able to write web site to sneak every files on your machine as soon as you visit their website.

If you do need to do that, you probably need to look into ActiveX or plug-ins. That would require you to get a digital signature and sign and all that to make sure you are trusted by your users. It will be something similar to Windows Update's website or many online Virus Scanner website.

Thanks
Ron Rushing
Posted: Wednesday, November 12, 2008 5:54:37 PM
Rank: Member
Groups: Member

Joined: 10/28/2008
Posts: 23
It is an internal web site with a SSL cert ... thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.