Set Destination Folder on saving

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 22 Jun 2012 Link to this post


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

    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 !!!!!

  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 26 Jun 2012 Link to this post

    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.

    Iva Toteva
    the Telerik team

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

  3. DevCraft R3 2016 release webinar banner
Back to Top