Ticket T320631
Visible to All Users

How to save data to SQL without showing the Save File Dialog

created 9 years ago

[DevExpress Support Team: CLONED FROM T320563: Diagram Save to SQL]
Hi at DevE…

And first  - thanks for the update to 15.2 :-)

But one of the new things is the diagram function and of course one of the things I started looking at.

But, work has to be saved, and as I use a database I used the stream approach (like with Dashboards), but… In the Dashboard the e.handled = true prevents the savediaglog to appear, but in the "DiagramSaveDocumentBarItem1.ItemClick" event, the e - parameter doesn´t have this function.

Is there a workarround, or… ???
Of course, what I want to achieve is, then the button is pressed, then data/stream is saved to my database (and this works), but then the save-dialog is shown - and it is this that I want to prevent, and has done so before with the e.handled setting.

Regards,

Michael

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hi,

I understand what you are talking about. Indeed, we do not provide the e.Handled property to prevent default handling of the DiagramSaveDocumentBarItem.ItemClick event. Our developers have been already informed of this inquiry and will consider it.

In the meantime, you can remove the existing bar button item and create your own one to handle its ItemClick event. DiagramControl has the SaveDocument method that allows you to save a document to a file or stream. It is possible to obtain the same image as the predefined button has by using the DXImage Gallery as shown in the attached video.

Let me know if you have any additional questions.

    Comments (3)
    MH MH
    Michael Hornshøj 9 years ago

      Hi there
      Thnx for your prompt reply - and as I could not find the Handled event/parameter/function, well lets just say that your reply didn´t come as the big surprise to me.
      And yes, manually create button - okay, thats a way, but Handled function would have been much easier ;-)
      Hope to see the function in the future - it is the first release, so… :-)
      Regards,
      Michael

      DevExpress Support Team 9 years ago

        DiagramControl is a new control that we are planning to extend intensively. I agree that setting the e.Handled property will allow you to accomplish your task in a simpler manner. So, as I said previously, I have already passed your idea to our development team.

        MH MH
        Michael Hornshøj 9 years ago

          As I just have written in the KB about pagesize: Superb !!!
          Michael
          PS And yes I know it is a new feature in your Winforms control collection - and that is why I sent you my suggestions right away, so it can get even better :-)

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.