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

CustomPlaces

3 Answers 42 Views
FileDialogs
This is a migrated thread and some comments may be shown as answers.
wang
Top achievements
Rank 1
wang asked on 16 Mar 2020, 05:41 AM

Hello.

I need directly selected the path like 'DeskTop', 'Videos' or other in the custom place pane sometimes in my application.

Is there has a way to return the selected custom place path in custom place pane?

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 18 Mar 2020, 09:06 PM

Hello Wang,

If I understood you correctly, you have some custom places defined in the dialog and you want an API that allows you to get and set the selection in the custom places? Can you confirm that this is your case? If not, can you provide some more details on the topic?

Regards,
Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
wang
Top achievements
Rank 1
answered on 19 Mar 2020, 01:30 AM
yes right.
I want  to know whether a method that  allows me to get and set the selection in the custom places
0
Martin Ivanov
Telerik team
answered on 23 Mar 2020, 08:58 AM

Hello Wang,

The custom places pane of the file dialogs is not selectable itself. This means that it doesn't track a selected item. Instead, when you click an item from the custom places, the dialog is navigated to the corresponding directory. This said, you can get the currently selected directory and match it with the ones in the custom places collection. If the collection contains it, so a custom place is selected. The same is valid for the opposite direction - get a path from the custom places and open it in the dialog.

To achieve this, you can set the InitialDirectory property of the file dialog just before the ShowDialog() call. I hope this helps. 

Regards,
Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileDialogs
Asked by
wang
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
wang
Top achievements
Rank 1
Share this question
or