Roots in SaveFileDialog

0
0

I have some questions about the roots inside the SaveFileDialog:

  1. Even setting up the complete InitialDirectory, for example “C:\Folder” the files are not shown. Am I obligated to change the InitialDirectory to “C:\” and add a new root referring the folder “Folder”?
  2. Am I obligated to select a root to see the files? Can I select a default root programmatically avoiding to select the root manually?

 

Thanks in advance!

Sergio

  • You must to post comments
0
0

Has there been an update to this?

Wisej.Web.SaveFileDialog dialog = new Wisej.Web.SaveFileDialog();
dialog.Roots.Add(new FileSystemProvider(Application.Session[“GlobalProperties.DataFileLocation”] + “Project”, “Project”));
dialog.InitialDirectory = Application.Session[“GlobalProperties.DataFileLocation”] + “Project”;

DialogResult result = dialog.ShowDialog();

No existing files are displayed

__

If we do this:

Wisej.Web.SaveFileDialog dialog = new Wisej.Web.SaveFileDialog();
dialog.Roots.Add(new FileSystemProvider(“./”, “Main_Directory”));
DialogResult result = dialog.ShowDialog();

And the user navigates to the Project folder, then the files in the Project folder are displayed.

__

We do not want users to be able to navigate outside of the Project folder, but we want to display the contents of the Project folder when the dialog is displayed.

  • You must to post comments
0
0

Hi Sergio,

To answer your questions:

  1. You can set both InitialDirectory and the Root as the same path, “C:\Folder”. If you have the root as “C:\” and the InitialDirectory as “C:\Folder”, the moment you select the root you’ll be inside “C:\Folder”
  2. Unfortunately, you can’t select the root programatically for now.

HTH,
Alaa

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.