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

Set Destination Folder on saving

1 Answer 73 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 22 Jun 2012, 04:23 PM
Hi,

is it possible to pre-select the destination-folder on saving a document in the richtextbox by code?

Background:
For Each Project in my Application i have to create a Folder (d:/Projects/Holiday_2012/Docs/). After opening a project in my
application the user could create a document in the richtextbox. If the user wants so save the document the Dialog should open
in the wright Destination Folder.

SOLVED !!!!!

Thanks
Regards
Rene

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 26 Jun 2012, 03:27 PM
Hi Rene,

The default SaveCommand does not set the InitialDirectory property of the SaveFileDialog.

In order to achieve the desired behavior, you can implement a custom SaveCommand that sets the initial directory the SaveFileDialog should use. You can change the path depending on different factors.

Please find attached the source code of a custom save command. In the example, the setting of the InitialDirectory is hard-coded in the ShowSaveDialog method, but you can modify the class to suit your goals best.

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
ITA
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or