This is a migrated thread and some comments may be shown as answers.

Default directory

1 Answer 186 Views
FilePathPicker
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 1
Veteran
Hans asked on 04 Sep 2020, 02:29 PM

Hi,

I have a FilePathPicker with DialogType="OpenFile".  Is there a way to set a default directory so that wen a user wants to pick a file, the FilePathPicker opens the the dialog with the files in this directory ?

Regards,
Hans

 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Sep 2020, 11:16 AM

Hello Hans,

To achieve your requirement, you can subscribe to the DialogOpening event of RadFilePathPicker and set the InitialDirectory property of the dialog.

private void filePathPicker_DialogOpening(object sender, Telerik.Windows.Controls.FileDialogs.DialogOpeningEventArgs e)
{
	e.Dialog.InitialDirectory = @"C:\temp";
}

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
FilePathPicker
Asked by
Hans
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
Share this question
or