Current filter:
                                You should refresh the page.
                                  • Hello Support,

                                    We're using the picture box functionality for collecting customer signatures, and storing them. Unfortunately, when we are displaying the collected data in print preview, the clear signature button is not working as we expected. We want to clear the entire signature image, so the customer can create a new one (sign on an empty picture box).

                                    Please give us advice, how we can make this to work.

                                    Thanks!

                                • Elliot (DevExpress Support) 03.12.2019

                                  Hello,

                                  I cannot replicate this issue using the attached sample project. Would you please try to modify it so we can replicate this issue on our side? This will make the situation clearer.

                                  Thanks,
                                  Elliot

                                • Abrish a 03.12.2019

                                  Hello support,

                                  I made the changes only on this file, please replace it and try with the sample project.

                                  Thanks!

                                • Elliot (DevExpress Support) 03.13.2019

                                  Hello Abrish,

                                  It appears that the cause of this issue is that you close the Stream (MemoryStream) object used to load an image into the XRPictureBox control. Please correct it.

                                  Thanks,
                                  Elliot

                                • Abrish a 03.13.2019

                                  Hi Elliot,

                                  I tried as you suggested, but still without success :(
                                  Can you edit the report file, please?

                                  Thanks!

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Abrish,

                                Thank you for your reply. Note that the 'Clear Changes' button in the Signature editor loads a default image to the XRPictureBox not clears it. If you want to clear an image in the Signature editor, it is necessary to register a custom editor on the server side via the EditingFieldExtensionsWin.Instance.RegisterEditor method in the Application.Start event handler. Then, handle the ASPxWebDocumentViewer.Init event to register a custom editor on the client side. Here is a corresponding code snippet:

                                [C#]
                                protected void Application_Start() { ..... RepositoryItem item; EditingFieldExtensionsWin.Instance.TryGetRepositoryItem("Signature", out item); EditingFieldExtensionsWin.Instance.RegisterEditor("CustomImageAndSignature", "CustomImageAndSignature", null, item); MVCxReportDesigner.StaticInitialize(); ....
                                [JavaScript]
                                <script type="text/javascript"> function onInit(s, e) { DevExpress.Report.EditingFieldExtensions.registerImageEditor({ name: "CustomImageAndSignature", displayName: "CustomImageAndSignature", drawingEnabled: true, imageLoadEnabled: false, customizeActions: (s, e) => { var clearButton = e.filter(button => { return button.id == DevExpress.Report.Preview.PictureEditorActionId.Clear })[0]; clearButton.action = () => { s.painter.reset(null) } } }) } </script> @Html.DevExpress().WebDocumentViewer(settings => { settings.Name = "WebDocumentViewer1"; settings.ClientSideEvents.Init = "onInit"; }).Bind(new XtraReport1()).GetHtml()

                                Thanks,
                                Elliot

                                • Abrish a 03.15.2019

                                  Thank you Elliot for the help, and the detailed explanation! Please mark your answer as a solution for this question, because I wasn't able to mark it. 

                                • Elliot (DevExpress Support) 03.18.2019

                                  Hello Abrish,

                                  I have converted my comment to an answer so you can mark it as a solution.

                                  Thanks,
                                  Elliot